about summary refs log tree commit diff
path: root/gn3/api
diff options
context:
space:
mode:
Diffstat (limited to 'gn3/api')
-rw-r--r--gn3/api/metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/gn3/api/metadata.py b/gn3/api/metadata.py
index 02fb721..f51616e 100644
--- a/gn3/api/metadata.py
+++ b/gn3/api/metadata.py
@@ -405,13 +405,15 @@ def get_wiki_entries(symbol):
     response = get_wiki_entries_by_symbol(
         symbol=symbol,
         sparql_uri=current_app.config.get("SPARQL_ENDPOINT"))
-    if not response.get("data"):
+    data = response.get("data")
+    if not data:
+        data = {}
         status_code = 404
     if content_type == "application/ld+json":
         response = make_response(response)
         response.headers["Content-Type"] = "application/ld+json"
         return response, status_code
-    return jsonify(response.get("data")), status_code
+    return jsonify(data), status_code
 
 
 @metadata.route("/genewikis/ncbi/<symbol>", methods=["GET"])