diff options
author | zsloan | 2022-06-23 19:00:00 +0000 |
---|---|---|
committer | zsloan | 2022-06-23 19:00:00 +0000 |
commit | 895ae3ae28703d939d218429d15768649a53f18a (patch) | |
tree | 32dcd86e113e509167d66d68af4c075b06f30410 /wqflask/base | |
parent | a4836e8d5d79660c57099a23d306ff2b2f13be06 (diff) | |
download | genenetwork2-895ae3ae28703d939d218429d15768649a53f18a.tar.gz |
Convert trait.view to string for conversion to JSON
It's originally a boolean, which causes an error when passed to the JS
code as JSON
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/trait.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index 11b28c5c..0333e429 100644 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -302,7 +302,7 @@ def jsonable(trait, dataset=None): if dataset.type == "ProbeSet": return dict(name=trait.name, - view=trait.view, + view=str(trait.view), symbol=trait.symbol, dataset=dataset.name, dataset_name=dataset.shortname, @@ -316,7 +316,7 @@ def jsonable(trait, dataset=None): elif dataset.type == "Publish": if trait.pubmed_id: return dict(name=trait.name, - view=trait.view, + view=str(trait.view), dataset=dataset.name, dataset_name=dataset.shortname, description=trait.description_display, @@ -332,7 +332,7 @@ def jsonable(trait, dataset=None): ) else: return dict(name=trait.name, - view=trait.view, + view=str(trait.view), dataset=dataset.name, dataset_name=dataset.shortname, description=trait.description_display, @@ -346,14 +346,14 @@ def jsonable(trait, dataset=None): ) elif dataset.type == "Geno": return dict(name=trait.name, - view=trait.view, + view=str(trait.view), dataset=dataset.name, dataset_name=dataset.shortname, location=trait.location_repr ) elif dataset.name == "Temp": return dict(name=trait.name, - view=trait.view, + view=str(trait.view), dataset="Temp", dataset_name="Temp") else: |