diff --git a/backend/export/property_scenarios/main.py b/backend/export/property_scenarios/main.py index b179531d..0ab59e27 100644 --- a/backend/export/property_scenarios/main.py +++ b/backend/export/property_scenarios/main.py @@ -140,8 +140,16 @@ def handler( body_dict = { "task_id": "test", "subtask_id": "test", - "portfolio_id": 670, - "scenario_ids": [1199], + "portfolio_id": 655, + "scenario_ids": [], + "default_plans_only": True, + } + + body_dict = { + "task_id": "test", + "subtask_id": "test", + "portfolio_id": 655, + "scenario_ids": [1174], "default_plans_only": False, } :param event: Lambda event containing export request details @@ -165,14 +173,8 @@ def handler( with db_read_session() as session: exported_files = process_export(payload, session) - output_path = f"/tmp/export_{payload.portfolio_id}.xlsx" - with pd.ExcelWriter(output_path, engine="openpyxl") as writer: - for group_key, df in exported_files.items(): - sheet_name = str(group_key)[:31] # Excel sheet name limit - df.to_excel(writer, sheet_name=sheet_name, index=False) - - logger.info("Exported to %s", output_path) # TODO: Need to handle the exported files - e.g. upload to s3 and email a presigned url + _ = exported_files return { "statusCode": 200, "body": json.dumps({}),