diff options
author | zsloan | 2021-08-20 17:46:20 +0000 |
---|---|---|
committer | zsloan | 2021-08-20 17:46:58 +0000 |
commit | 898b80d34442c16399366a5744cc26a157a727cb (patch) | |
tree | e12cea63150bf12911c6f18a9591433d7d177589 /wqflask/base/trait.py | |
parent | d4ce7c77f9cdd73516dba6f04f03ff38be8af0a4 (diff) | |
download | genenetwork2-898b80d34442c16399366a5744cc26a157a727cb.tar.gz |
Fixed some logic in trait.py that could cause a problem if a dataset_name was passed that wasn't Temp
Diffstat (limited to 'wqflask/base/trait.py')
-rw-r--r-- | wqflask/base/trait.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 10851e00..96a09302 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -27,11 +27,13 @@ def create_trait(**kw): assert bool(kw.get('name')), "Needs trait name" - if kw.get('dataset_name'): + if bool(kw.get('dataset')): + dataset = kw.get('dataset') + else: if kw.get('dataset_name') != "Temp": dataset = create_dataset(kw.get('dataset_name')) - else: - dataset = kw.get('dataset') + else: + dataset = create_dataset("Temp", group_name=kw.get('group_name')) if dataset.type == 'Publish': permissions = check_resource_availability( |