Skip to content

Commit

Permalink
Debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
talavis committed May 17, 2019
1 parent fc5c9e4 commit 2495c36
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,15 +228,13 @@ class AuthorizedStaticNginxFileHandler(AuthorizedHandler, BaseStaticNginxFileHan
class TemporaryStaticNginxFileHandler(BaseStaticNginxFileHandler):
def get(self, dataset, ds_version, hash_value, file):
logging.debug("Want to download hash {} ({})".format(hash_value, file))
logging.error("{dataset}, {ds_version}, {hash_value,} {file}")
linkhash = (db.Linkhash
.select()
.join(db.DatasetVersion)
.join(db.DatasetFile)
.where(db.Linkhash.hash == hash_value,
db.Linkhash.expires_on > datetime.datetime.now(),
db.DatasetFile.name == file))
logging.error(linkhash)
if linkhash.count() > 0:
logging.debug("Linkhash valid")
# Get temporary user from hash_value
Expand All @@ -245,7 +243,7 @@ def get(self, dataset, ds_version, hash_value, file):
.join(db.Linkhash)
.where(db.Linkhash.hash == hash_value)
).get()
super().get(dataset, file, user)
super().get(dataset, file, ds_version, user)
else:
logging.debug("Linkhash invalid")
self.send_error(status_code=403)
Expand Down

0 comments on commit 2495c36

Please sign in to comment.