aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base
diff options
context:
space:
mode:
authorBonfaceKilz2020-12-16 15:09:42 +0300
committerGitHub2020-12-16 15:09:42 +0300
commita6ae88d773db27394aa7120ce2c552bff8f9c857 (patch)
tree70c8d7caeb364bbe73ebf830808f1997e4aebab7 /wqflask/base
parent09e6d353d1808921d4f361d297bf1ef52d2861f3 (diff)
parent218a2aa198cb70761ddd20c94169941f3ea86188 (diff)
downloadgenenetwork2-a6ae88d773db27394aa7120ce2c552bff8f9c857.tar.gz
Merge branch 'testing' into replace-bootstrap
Diffstat (limited to 'wqflask/base')
-rw-r--r--wqflask/base/trait.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py
index ec8c40a0..50bd8874 100644
--- a/wqflask/base/trait.py
+++ b/wqflask/base/trait.py
@@ -25,19 +25,19 @@ def create_trait(**kw):
assert bool(kw.get('dataset')) != bool(
kw.get('dataset_name')), "Needs dataset ob. or name"
- if kw.get('name'):
- if kw.get('dataset_name'):
- if kw.get('dataset_name') != "Temp":
- dataset = create_dataset(kw.get('dataset_name'))
- else:
- dataset = kw.get('dataset')
+ assert bool(kw.get('name')), "Needs trait name"
+ if kw.get('dataset_name'):
if kw.get('dataset_name') != "Temp":
- if dataset.type == 'Publish':
- permissions = check_resource_availability(
- dataset, kw.get('name'))
- else:
- permissions = check_resource_availability(dataset)
+ dataset = create_dataset(kw.get('dataset_name'))
+ else:
+ dataset = kw.get('dataset')
+
+ if dataset.type == 'Publish':
+ permissions = check_resource_availability(
+ dataset, kw.get('name'))
+ else:
+ permissions = check_resource_availability(dataset)
if "view" in permissions['data']:
the_trait = GeneralTrait(**kw)