aboutsummaryrefslogtreecommitdiff
path: root/wqflask/base/trait.py
diff options
context:
space:
mode:
authorAlexander Kabui2020-12-08 18:52:44 +0300
committerAlexander Kabui2020-12-08 18:52:44 +0300
commitef063d9c1de5feb5bbba4eeae2921b0c29135f3f (patch)
treead2f28b7cba5f91bf44c2cbff71675670def5274 /wqflask/base/trait.py
parentb3b2a6a6792896c59b8dbbd3bbe1bf8c650b223e (diff)
parentdf5361f36d98fa53727cf1f71682ec9a9f3b3ec4 (diff)
downloadgenenetwork2-ef063d9c1de5feb5bbba4eeae2921b0c29135f3f.tar.gz
resolve conflict
Diffstat (limited to 'wqflask/base/trait.py')
-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)