Skip to content

Commit a31a230

Browse files
Update participant data handling in CertifiedBuilder class to use model_dump method for improved serialization. This change enhances the consistency of participant data representation in certificate generation results.
1 parent e218eb7 commit a31a230

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

certified_builder/certified_builder.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def build_certificates(self, participants: List[Participant]):
3737
certificate_path = self.save_certificate(certificate_generated, participant)
3838

3939
results.append({
40-
"participant": participant.dict(),
40+
"participant": participant.model_dump(),
4141
"certificate_path": certificate_path,
4242
"success": True
4343
})
@@ -46,7 +46,7 @@ def build_certificates(self, participants: List[Participant]):
4646
except Exception as e:
4747
logger.error(f"Erro ao gerar certificado para {participant.name_completed()}: {str(e)}")
4848
results.append({
49-
"participant": participant.dict(),
49+
"participant": participant.model_dump(),
5050
"error": str(e),
5151
"success": False
5252
})

0 commit comments

Comments
 (0)