diff options
author | Pjotr Prins | 2020-07-25 16:25:14 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-07-25 16:25:14 +0100 |
commit | 91e52482071ce90acf3607597de2ae79e298fd67 (patch) | |
tree | 833840bd799c55b26263c545e7f1f25967844e09 /wqflask/utility/authentication_tools.py | |
parent | 869e3a2d7f1ef0a44cc90612a46b02d7b01bab88 (diff) | |
download | genenetwork2-91e52482071ce90acf3607597de2ae79e298fd67.tar.gz |
The variable is never defined, so let's default to "none"
Diffstat (limited to 'wqflask/utility/authentication_tools.py')
-rw-r--r-- | wqflask/utility/authentication_tools.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py index ed7462d1..9a2a5ccd 100644 --- a/wqflask/utility/authentication_tools.py +++ b/wqflask/utility/authentication_tools.py @@ -45,7 +45,7 @@ def check_resource_availability(dataset, trait_id=None): def add_new_resource(dataset, trait_id=None): resource_ob = { - 'owner_id' : webqtlConfig.DEFAULT_OWNER_ID, + 'owner_id' : "none", # webqtlConfig.DEFAULT_OWNER_ID, 'default_mask': webqtlConfig.DEFAULT_PRIVILEGES, 'group_masks' : {} } @@ -84,6 +84,7 @@ def check_admin(resource_id=None): try: response = json.loads(requests.get(the_url).content)['admin'] except: + logger.debug(resource_info) response = resource_info['default_mask']['admin'] if 'edit-admins' in response: @@ -124,4 +125,4 @@ def check_owner_or_admin(dataset=None, trait_id=None, resource_id=None): else: return check_admin(resource_id) - return "not-admin"
\ No newline at end of file + return "not-admin" |