aboutsummaryrefslogtreecommitdiff
path: root/wqflask/maintenance/set_resource_defaults.py
diff options
context:
space:
mode:
authorzsloan2020-06-17 16:28:15 -0500
committerzsloan2020-06-17 16:28:15 -0500
commitfcb3cb1105cf2a1d97c1a08fa636b118ed231ffa (patch)
treecab30579676503bef2596206684a66783bde6832 /wqflask/maintenance/set_resource_defaults.py
parent15f5df7fe795a32e2d61dd11f825e53b1a1175ec (diff)
downloadgenenetwork2-authentication_test.tar.gz
A user's id is now set as a parameter if it doesn't already existauthentication_test
Diffstat (limited to 'wqflask/maintenance/set_resource_defaults.py')
-rw-r--r--wqflask/maintenance/set_resource_defaults.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/wqflask/maintenance/set_resource_defaults.py b/wqflask/maintenance/set_resource_defaults.py
index 344e6a23..0c221bbf 100644
--- a/wqflask/maintenance/set_resource_defaults.py
+++ b/wqflask/maintenance/set_resource_defaults.py
@@ -27,8 +27,9 @@ sys.path.insert(0,'./')
# NEW: import app to avoid a circular dependency on utility.tools
from wqflask import app
+from utility import hmac
from utility.tools import SQL_URI
-from utility.redis_tools import get_redis_conn, get_user_id, add_resource, get_resources
+from utility.redis_tools import get_redis_conn, get_user_id, add_resource, get_resources, get_resource_info
Redis = get_redis_conn()
import MySQLdb
@@ -117,7 +118,7 @@ def insert_geno_resources(default_owner_id):
resource_ob = {}
resource_ob['name'] = resource[1]
if resource[1] == "HET3-ITPGeno":
- resource_ob['owner_id'] = "73a3f093-ca13-4ae0-a179-9a446f709f6e"
+ resource_ob['owner_id'] = "c5ce8c56-78a6-474f-bcaf-7129d97f56ae"
else:
resource_ob['owner_id'] = default_owner_id
resource_ob['data'] = { "dataset" : str(resource[0]) }
@@ -145,7 +146,8 @@ def main():
Redis.delete("resources")
- owner_id = get_user_id("email_address", "zachary.a.sloan@gmail.com")
+ owner_id = "c5ce8c56-78a6-474f-bcaf-7129d97f56ae"
+
insert_resources(owner_id)
if __name__ == '__main__':