aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzsloan2020-06-20 17:53:51 -0500
committerzsloan2020-06-20 17:53:51 -0500
commita13e2c5856acd05610a5966d3f8ecc17038e4735 (patch)
tree307adef36c8162eb2b25a53e4fb2288b9a491b6c
parent51417c06061246bc92be89db198b3e74e7126035 (diff)
downloadgenenetwork2-a13e2c5856acd05610a5966d3f8ecc17038e4735.tar.gz
Missed one issue introduced by last commit
-rw-r--r--wqflask/wqflask/show_trait/show_trait.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/wqflask/wqflask/show_trait/show_trait.py b/wqflask/wqflask/show_trait/show_trait.py
index 4698807a..5fc69cab 100644
--- a/wqflask/wqflask/show_trait/show_trait.py
+++ b/wqflask/wqflask/show_trait/show_trait.py
@@ -49,18 +49,23 @@ class ShowTrait(object):
self.temp_trait = False
self.trait_id = kw['trait_id']
helper_functions.get_species_dataset_trait(self, kw)
+ self.resource_id = get_resource_id(self.dataset, self.trait_id)
+ self.admin_status = check_owner_or_admin(resource_id=self.resource_id)
elif 'group' in kw:
self.temp_trait = True
self.trait_id = "Temp_"+kw['species']+ "_" + kw['group'] + "_" + datetime.datetime.now().strftime("%m%d%H%M%S")
self.temp_species = kw['species']
self.temp_group = kw['group']
self.dataset = data_set.create_dataset(dataset_name = "Temp", dataset_type = "Temp", group_name = self.temp_group)
+
# Put values in Redis so they can be looked up later if added to a collection
Redis.set(self.trait_id, kw['trait_paste'], ex=ONE_YEAR)
self.trait_vals = kw['trait_paste'].split()
self.this_trait = create_trait(dataset=self.dataset,
name=self.trait_id,
cellid=None)
+
+ self.admin_status = check_owner_or_admin(dataset=self.dataset, trait_id=self.trait_id)
else:
self.temp_trait = True
self.trait_id = kw['trait_id']
@@ -70,10 +75,9 @@ class ShowTrait(object):
self.this_trait = create_trait(dataset=self.dataset,
name=self.trait_id,
cellid=None)
- self.trait_vals = Redis.get(self.trait_id).split()
- self.resource_id = get_resource_id(self.dataset, self.trait_id)
- self.admin_status = check_owner_or_admin(resource_id=self.resource_id)
+ self.trait_vals = Redis.get(self.trait_id).split()
+ self.admin_status = check_owner_or_admin(dataset=self.dataset, trait_id=self.trait_id)
#ZS: Get verify/rna-seq link URLs
try: