From 2d4974369f23e02ebc4f7c94d69fecf6f5715a3a Mon Sep 17 00:00:00 2001 From: Sayyid Hamid Mahdavi Date: Thu, 17 Jul 2025 12:15:32 +0330 Subject: [PATCH] add celery --- apps/push_notifications/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/push_notifications/views.py b/apps/push_notifications/views.py index c29063a..0d42008 100644 --- a/apps/push_notifications/views.py +++ b/apps/push_notifications/views.py @@ -62,8 +62,8 @@ class ApplicationPushUserViewSet( def perform_create(self, serializer): user_uuid = self.kwargs.get('user_uuid') - user, _ = User.objects.get_or_create(uuid=user_uuid) - push_user = PushUser.objects.submit(user) + user = get_object_or_404(User, uuid=user_uuid) + push_user = get_object_or_404(PushUser, user=user) application = get_application(self.request) instance = serializer.save(push_user=push_user, application=application) instance.send_push()