diff options
author | Munyoki Kilyungi | 2024-09-03 15:05:06 +0300 |
---|---|---|
committer | BonfaceKilz | 2024-09-05 16:39:14 +0300 |
commit | 348057ee134ce0cd918a3033c91f63fcd5d56497 (patch) | |
tree | 88cdc800a61e0f0de5c476306e62f8c06ab03411 /gn3 | |
parent | 595afc87ecafd1ae68a83a9136aabcbc47cc583f (diff) | |
download | genenetwork3-348057ee134ce0cd918a3033c91f63fcd5d56497.tar.gz |
Correctly get categories in response.
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'gn3')
-rw-r--r-- | gn3/db/rdf/wiki.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/gn3/db/rdf/wiki.py b/gn3/db/rdf/wiki.py index 0ff4483..f945f06 100644 --- a/gn3/db/rdf/wiki.py +++ b/gn3/db/rdf/wiki.py @@ -145,11 +145,9 @@ CONSTRUCT { ) data = results.get("data") for result in data: - categories = result.get("categories") + categories = result.get("categories") or [] if categories and isinstance(categories, str): result["categories"] = [categories] - else: - result["categories"] = [] pmids = result.get("pubmed_ids") if pmids and isinstance(pmids, str): result["pubmed_ids"] = [pmids] |