Skip to content

Commit b9f5b59

Browse files
Update lambda_function.py to use model_dump for serialization in DateTimeEncoder and improve logging in lambda_handler to reflect participant processing count.
1 parent 70aa314 commit b9f5b59

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lambda_function.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ class DateTimeEncoder(json.JSONEncoder):
2828
def default(self, obj):
2929
if isinstance(obj, datetime):
3030
return obj.strftime('%Y-%m-%d %H:%M:%S')
31-
if hasattr(obj, 'dict'):
32-
return obj.dict()
31+
if hasattr(obj, 'model_dump'):
32+
return obj.model_dump()
3333
return super().default(obj)
3434

3535
def extract_data_body(event):
@@ -106,7 +106,7 @@ def lambda_handler(event, context):
106106
})
107107
}
108108

109-
logger.info("Iniciando geração de certificados")
109+
logger.info(f"Processing {len(participants_data)} participants")
110110

111111
# Create list of participants
112112
participants = []

0 commit comments

Comments
 (0)