Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed bugs caused by empty messages #199

Merged
merged 1 commit into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion openapi-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ servers:
# url: http://127.0.0.1:5000
termsOfService: http://robokop.renci.org:7055/tos?service_long=ARAGORN&provider_long=RENCI
title: ARAGORN
version: 2.4.12
version: 2.4.13
tags:
- name: translator
- name: ARA
Expand Down
4 changes: 2 additions & 2 deletions src/service_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ async def add_provenance(message):
each knowledge_graph edge and add an aggregated knowledge source of infores:robokop to it"""
new_provenance = {"resource_id": "infores:robokop", "resource_role": "aggregator_knowledge_source",
"upstream_resource_ids": ["infores:automat-robokop"]}
for edge in message["message"]["knowledge_graph"]["edges"].values():
for edge in message["message"].get("knowledge_graph",{}).get("edges",{}).values():
edge["sources"].append(new_provenance)
return message

Expand Down Expand Up @@ -984,7 +984,7 @@ async def combine_messages(answer_qnode, original_query_graph, lookup_query_grap
result["message"]["knowledge_graph"] = pydantic_kgraph.dict()
for rm in result_messages:
if "auxiliary_graphs" in result["message"]:
result["message"]["auxiliary_graphs"].update(rm["message"]["auxiliary_graphs"])
result["message"]["auxiliary_graphs"].update(rm["message"].get("auxiliary_graphs", {}))
# The result with the direct lookup needs to be handled specially. It's the one with the lookup query graph
lookup_results = [] # in case we don't have any
for result_message in result_messages:
Expand Down