From 9a17d8b92e7a61c691e04c757f66eb321a960aff Mon Sep 17 00:00:00 2001 From: Ben Galewsky Date: Thu, 1 Feb 2024 16:16:30 -0600 Subject: [PATCH 1/3] Include original submission in the status results --- aws/status.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/aws/status.py b/aws/status.py index b2ad8894..152c0447 100644 --- a/aws/status.py +++ b/aws/status.py @@ -25,9 +25,12 @@ def lambda_handler(event, context): print(status_rec) - print(automate_manager.get_log(status_rec['action_id'])) + result ={ + "original_submission": status_rec['original_submission'], + "flow_status":automate_manager.get_status(status_rec['action_id']) + } return { 'statusCode': 200, - 'body': json.dumps(automate_manager.get_status(status_rec['action_id'])) + 'body': json.dumps(result) } From dc9d36624b528ddd94643bc62172b5ef6553557a Mon Sep 17 00:00:00 2001 From: Ben Galewsky Date: Thu, 1 Feb 2024 16:21:18 -0600 Subject: [PATCH 2/3] original_submission is already a json string --- aws/status.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/status.py b/aws/status.py index 152c0447..2d1688fa 100644 --- a/aws/status.py +++ b/aws/status.py @@ -32,5 +32,5 @@ def lambda_handler(event, context): return { 'statusCode': 200, - 'body': json.dumps(result) + 'body': result } From 541a02c4df91929a6b9a0c84d9b7416c46c5ddc5 Mon Sep 17 00:00:00 2001 From: Ben Galewsky Date: Thu, 1 Feb 2024 16:28:07 -0600 Subject: [PATCH 3/3] Use a json.loads on original_submission --- aws/status.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/status.py b/aws/status.py index 2d1688fa..95333798 100644 --- a/aws/status.py +++ b/aws/status.py @@ -26,11 +26,11 @@ def lambda_handler(event, context): print(status_rec) result ={ - "original_submission": status_rec['original_submission'], + "original_submission": json.loads(status_rec['original_submission']), "flow_status":automate_manager.get_status(status_rec['action_id']) } return { 'statusCode': 200, - 'body': result + 'body': json.dumps(result) }