diff --git a/notifications/utils.py b/notifications/utils.py index a118cd7..8941e5b 100644 --- a/notifications/utils.py +++ b/notifications/utils.py @@ -112,6 +112,7 @@ def send_notification(notification_type, from_user_id, from_user_type, to_user_i def send_push(user, data): """ used to send push notification to specific user """ + data['notification_type'] = str(data['notification_type']) user.fcmdevice_set.filter(active=True).send_message( Message(notification=FirebaseNotification(data['title'], data['body']), data=data) ) @@ -119,6 +120,7 @@ def send_push(user, data): def send_multiple_push(queryset, data): """ used to send same notification to multiple users """ + data['notification_type'] = str(data['notification_type']) FCMDevice.objects.filter(user__in=queryset, active=True).send_message( Message(notification=FirebaseNotification(data['title'], data['body']), data=data) )