diff --git a/src/api/invitations.py b/src/api/invitations.py index 861f5a4..d09bdf4 100644 --- a/src/api/invitations.py +++ b/src/api/invitations.py @@ -120,7 +120,7 @@ class InvitationCreateData(_BaseInvitationData): user=invitee, event_type="invitation", message="new-invitation", - data=invitation.id, + data=str(cast(PydanticObjectId, invitation.id)), read=False, ) notification = await notification.create() @@ -232,7 +232,7 @@ async def accept_invitation(invitation_id: PydanticObjectId, user: CurrentUserDe user=invitation.invitor, event_type="invitation", message="invitation-accepted", - data=invitation.id, + data=str(cast(PydanticObjectId, invitation.id)), read=False, ) notification = await notification.create() @@ -265,7 +265,7 @@ async def decline_invitation(invitation_id: PydanticObjectId, user: CurrentUserD user=invitation.invitor, event_type="invitation", message="invitation-declined", - data=invitation.id, + data=str(cast(PydanticObjectId, invitation.id)), read=False, ) notification = await notification.create()