diff options
Diffstat (limited to 'wqflask/maintenance/set_resource_defaults.py')
-rw-r--r-- | wqflask/maintenance/set_resource_defaults.py | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/wqflask/maintenance/set_resource_defaults.py b/wqflask/maintenance/set_resource_defaults.py index c6c4f44c..0f472494 100644 --- a/wqflask/maintenance/set_resource_defaults.py +++ b/wqflask/maintenance/set_resource_defaults.py @@ -44,10 +44,10 @@ def parse_db_uri(): parsed_uri = urllib.parse.urlparse(SQL_URI) db_conn_info = dict( - db=parsed_uri.path[1:], - host=parsed_uri.hostname, - user=parsed_uri.username, - passwd=parsed_uri.password) + db=parsed_uri.path[1:], + host=parsed_uri.hostname, + user=parsed_uri.username, + passwd=parsed_uri.password) print(db_conn_info) return db_conn_info @@ -69,12 +69,12 @@ def insert_probeset_resources(default_owner_id): resource_ob['type'] = "dataset-probeset" if resource[2] < 1 and resource[3] > 0: resource_ob['default_mask'] = {"data": "view", - "metadata": "view", - "admin": "not-admin"} + "metadata": "view", + "admin": "not-admin"} else: resource_ob['default_mask'] = {"data": "no-access", - "metadata": "no-access", - "admin": "not-admin"} + "metadata": "no-access", + "admin": "not-admin"} resource_ob['group_masks'] = {} add_resource(resource_ob, update=False) @@ -101,11 +101,11 @@ def insert_publish_resources(default_owner_id): resource_ob['name'] = str(resource[0]) resource_ob['owner_id'] = default_owner_id resource_ob['data'] = {"dataset": str(resource[1]), - "trait": str(resource[0])} + "trait": str(resource[0])} resource_ob['type'] = "dataset-publish" resource_ob['default_mask'] = {"data": "view", - "metadata": "view", - "admin": "not-admin"} + "metadata": "view", + "admin": "not-admin"} resource_ob['group_masks'] = {} @@ -133,12 +133,12 @@ def insert_geno_resources(default_owner_id): resource_ob['type'] = "dataset-geno" if resource[2] < 1: resource_ob['default_mask'] = {"data": "view", - "metadata": "view", - "admin": "not-admin"} + "metadata": "view", + "admin": "not-admin"} else: resource_ob['default_mask'] = {"data": "no-access", - "metadata": "no-access", - "admin": "not-admin"} + "metadata": "no-access", + "admin": "not-admin"} resource_ob['group_masks'] = {} add_resource(resource_ob, update=False) |