From d7f2a9a1c886ee164a1f5a1be9892f470dbaa4b6 Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Tue, 28 Oct 2025 16:19:34 +0500 Subject: [PATCH] fi --- core/apps/notifications/views/notification.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/apps/notifications/views/notification.py b/core/apps/notifications/views/notification.py index 2f00ec9..b752003 100644 --- a/core/apps/notifications/views/notification.py +++ b/core/apps/notifications/views/notification.py @@ -12,7 +12,7 @@ class RegisterExpoPushToken(generics.GenericAPIView): def post(self, request): serializer = self.serializer_class(data=request.data) if serializer.is_valid(): - Notification.objects.update_or_create( + Notification.objects.get_or_create( user=request.user, token=serializer.validated_data['token'] )