aboutsummaryrefslogtreecommitdiff
path: root/gn3/db
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/db')
-rw-r--r--gn3/db/rdf/wiki.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/gn3/db/rdf/wiki.py b/gn3/db/rdf/wiki.py
index 67bc194..5c69083 100644
--- a/gn3/db/rdf/wiki.py
+++ b/gn3/db/rdf/wiki.py
@@ -43,6 +43,7 @@ def __sanitize_result(result: dict) -> dict:
categories = result.get("categories")
if isinstance(categories, str):
result["categories"] = [categories] if categories else []
+ result["categories"] = sorted(result["categories"])
pmids = result.get("pubmed_ids")
if isinstance(pmids, str):
result["pubmed_ids"] = [pmids] if pmids else []
@@ -52,6 +53,7 @@ def __sanitize_result(result: dict) -> dict:
int(pmid.split("/")[-1]) if isinstance(pmid, str) else pmid
for pmid in result["pubmed_ids"]
]
+ result["pubmed_ids"] = sorted(result["pubmed_ids"])
return result