aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/extract_lambda.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/extract_lambda.py b/src/extract_lambda.py
index 1df4c34..99117a4 100644
--- a/src/extract_lambda.py
+++ b/src/extract_lambda.py
@@ -39,14 +39,13 @@ def lambda_handler(event, context):
"statusCode": 200,
"body": json.dumps("No changes detected, no CSV files were uploaded."),
}
- else:
- return {
- "statusCode": 200,
- "body": json.dumps(
- f"""CSV files processed for {', '.join(any_changes['updated'])} and uploaded successfully.{
- 'The following tables were not updated: '+', '.join(any_changes['no change']) if any_changes['no change'] else ''}"""
- ),
- }
+ return {
+ "statusCode": 200,
+ "body": json.dumps(
+ f"""CSV files processed for {', '.join(any_changes['updated'])} and uploaded successfully.{
+ 'The following tables were not updated: '+', '.join(any_changes['no change']) if any_changes['no change'] else ''}"""
+ ),
+ }
except Exception as e:
logger.error(f"Error: {e}")
return {"statusCode": 500, "body": json.dumps("Internal server error.")}
git.ajschof.me — hosted by ajschofield — powered by cgit