From 80d8fd523151e7f2dbb69d4b6bb49f0a4101bcc6 Mon Sep 17 00:00:00 2001 From: Peter Vacho Date: Sun, 29 Dec 2024 14:58:36 +0100 Subject: [PATCH] Fix storing the invitation id into the notification --- src/api/invitations.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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()