From d1927b24ee09082ad08d4c786bd9a167b0891b9f Mon Sep 17 00:00:00 2001 From: abutalib-kiwi Date: Fri, 6 Oct 2023 18:10:56 +0530 Subject: [PATCH] to user type added --- notifications/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/notifications/utils.py b/notifications/utils.py index 0764db6..9e360df 100644 --- a/notifications/utils.py +++ b/notifications/utils.py @@ -90,9 +90,12 @@ def get_notification_data(notification_type, from_user_id, from_user_type, to_us notification_data['body'] = notification_data['body'].format(from_user=from_user_name, task_name=task_name, points=points) + push_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data['from_user'] = from_user_name notification_data['from_user_image'] = from_user_image - notification_data['to_user_type'] = GUARDIAN if from_user_type == JUNIOR else JUNIOR + notification_data.update(extra_data) to_user = User.objects.filter(id=to_user_id).first()