From 86f25ddb57be49d8a0537c830ae321974dd1f2ca Mon Sep 17 00:00:00 2001 From: abdollahis2 Date: Wed, 13 Nov 2024 16:06:46 -0500 Subject: [PATCH 1/2] changed edge num for pathfinder queries --- tr_sys/tr_ars/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tr_sys/tr_ars/api.py b/tr_sys/tr_ars/api.py index 4eb2580..8e9f3cb 100644 --- a/tr_sys/tr_ars/api.py +++ b/tr_sys/tr_ars/api.py @@ -100,7 +100,7 @@ def submit(req): # derive query_type node_count=len(data['message']['query_graph']['nodes'].keys()) edge_count=len(data['message']['query_graph']['edges'].keys()) - if node_count==3 and edge_count==2: + if node_count==3 and edge_count==3: params = {"query_type":"pathfinder"} if node_count==2 and edge_count==1: params = {"query_type":"standard"} From 8eda62067fb106128cbd0b111d7690d9dbcea01d Mon Sep 17 00:00:00 2001 From: abdollahis2 Date: Wed, 13 Nov 2024 16:11:59 -0500 Subject: [PATCH 2/2] better standard query type handling --- tr_sys/tr_ars/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tr_sys/tr_ars/api.py b/tr_sys/tr_ars/api.py index 8e9f3cb..cad1190 100644 --- a/tr_sys/tr_ars/api.py +++ b/tr_sys/tr_ars/api.py @@ -102,7 +102,7 @@ def submit(req): edge_count=len(data['message']['query_graph']['edges'].keys()) if node_count==3 and edge_count==3: params = {"query_type":"pathfinder"} - if node_count==2 and edge_count==1: + else: params = {"query_type":"standard"} # if 'message' not in data: # return HttpResponse('Not a valid Translator query json', status=400)