Fix storing the invitation id into the notification

This commit is contained in:
Peter Vacho 2024-12-29 14:58:36 +01:00
parent 63c2bc3b70
commit 80d8fd5231
Signed by: school
GPG key ID: 8CFC3837052871B4

View file

@ -120,7 +120,7 @@ class InvitationCreateData(_BaseInvitationData):
user=invitee, user=invitee,
event_type="invitation", event_type="invitation",
message="new-invitation", message="new-invitation",
data=invitation.id, data=str(cast(PydanticObjectId, invitation.id)),
read=False, read=False,
) )
notification = await notification.create() notification = await notification.create()
@ -232,7 +232,7 @@ async def accept_invitation(invitation_id: PydanticObjectId, user: CurrentUserDe
user=invitation.invitor, user=invitation.invitor,
event_type="invitation", event_type="invitation",
message="invitation-accepted", message="invitation-accepted",
data=invitation.id, data=str(cast(PydanticObjectId, invitation.id)),
read=False, read=False,
) )
notification = await notification.create() notification = await notification.create()
@ -265,7 +265,7 @@ async def decline_invitation(invitation_id: PydanticObjectId, user: CurrentUserD
user=invitation.invitor, user=invitation.invitor,
event_type="invitation", event_type="invitation",
message="invitation-declined", message="invitation-declined",
data=invitation.id, data=str(cast(PydanticObjectId, invitation.id)),
read=False, read=False,
) )
notification = await notification.create() notification = await notification.create()