# HG changeset patch # User Dennis C. M. # Date 1686242932 -3600 # Node ID d4c4cd4760fa952a6d3b6616bba8f1b0a5f13fab # Parent d09dee7a86dae7577990ec3df873c7c13bab4224 fix KeyError bug diff -r d09dee7a86da -r d4c4cd4760fa events/get_report_event.json --- a/events/get_report_event.json Thu Jun 08 17:35:26 2023 +0100 +++ b/events/get_report_event.json Thu Jun 08 17:48:52 2023 +0100 @@ -1,7 +1,7 @@ { "queryStringParameters": { - "ticker": "san", - "type": "balance", + "ticker": "acx", + "type": "pnl", "year": "2021" } } \ No newline at end of file diff -r d09dee7a86da -r d4c4cd4760fa events/upload_document_event.json --- a/events/upload_document_event.json Thu Jun 08 17:35:26 2023 +0100 +++ b/events/upload_document_event.json Thu Jun 08 17:48:52 2023 +0100 @@ -1,13 +1,13 @@ { - "statusCode": 200, - "body": { - "message": { - "companyTicker": "san", - "docType": "balance", - "fileId": "50d30446-015c-47bd-bb33-af487120c0d5", - "fileName": "san_balance_50d30446-015c-47bd-bb33-af487120c0d5.json", - "objectKey": "processed/san_balance_50d30446-015c-47bd-bb33-af487120c0d5.json", - "bucketName": "sandbox-finance-parser-data" - } - } + "statusCode": 200, + "body": { + "message": { + "companyTicker": "acx", + "docType": "pnl", + "fileId": "decc36fa-540d-40d0-ae50-048cb3270571", + "fileName": "acx_pnl_decc36fa-540d-40d0-ae50-048cb3270571.json", + "objectKey": "processed/acx_pnl_decc36fa-540d-40d0-ae50-048cb3270571.json", + "bucketName": "sandbox-finance-parser-data" + } + } } \ No newline at end of file diff -r d09dee7a86da -r d4c4cd4760fa upload_document/app.py --- a/upload_document/app.py Thu Jun 08 17:35:26 2023 +0100 +++ b/upload_document/app.py Thu Jun 08 17:48:52 2023 +0100 @@ -58,7 +58,7 @@ batch.put_item( Item={ - 'pk': f"balance#{event_msg['companyTicker']}", + 'pk': f"{event_msg['docType']}#{event_msg['companyTicker']}", 'sk': f'{date}#{row_index}', 'account_name': account_name, 'account_value': account_value,