Skip to content

Commit 65a0d19

Browse files
committed
field serializer fix
1 parent cf0897f commit 65a0d19

File tree

1 file changed

+1
-1
lines changed
  • backend/app/infrastructure/kafka/events

1 file changed

+1
-1
lines changed

backend/app/infrastructure/kafka/events/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class BaseEvent(AvroBase):
2424

2525
model_config = ConfigDict()
2626

27-
@field_serializer('timestamp')
27+
@field_serializer('timestamp', when_used='json')
2828
def serialize_timestamp(self, dt: datetime) -> str:
2929
return dt.isoformat()
3030

0 commit comments

Comments
 (0)