From bbdfd9abcf1fae94099e3958bdd5c47e6b09a23f Mon Sep 17 00:00:00 2001 From: behruz-dev Date: Thu, 30 Oct 2025 17:40:04 +0500 Subject: [PATCH] fix --- core/apps/notifications/utils/send_notification.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core/apps/notifications/utils/send_notification.py b/core/apps/notifications/utils/send_notification.py index 73bface..2d76ddf 100644 --- a/core/apps/notifications/utils/send_notification.py +++ b/core/apps/notifications/utils/send_notification.py @@ -11,10 +11,7 @@ EXPO_API_URL = "https://exp.host/--/api/v2/push/send" def send_notification(token, title, body, data=None): tokens = list(Notification.objects.exclude(token=token).values_list("token", flat=True)) users = list(Notification.objects.exclude(token=token).values_list("user", flat=True)) - user_ids = [] - for user in users: - user_ids.append(user) - create_history.delay(user_ids, title, body, data) + create_history.delay(users, title, body, data) if not tokens: return {"error": "No tokens found"}