added notification for existing junior add, modified leaderboard method at every places

This commit is contained in:
abutalib-kiwi
2023-08-28 19:39:39 +05:30
parent df3cab99a5
commit 219bae792e
7 changed files with 56 additions and 36 deletions

View File

@ -22,7 +22,7 @@ from account.models import UserEmailOtp, UserNotification
from junior.utils import junior_notification_email, junior_approval_mail, get_junior_leaderboard_rank
from guardian.utils import real_time, update_referral_points, convert_timedelta_into_datetime
from notifications.utils import send_notification
from notifications.constants import (ASSOCIATE_REQUEST, JUNIOR_ADDED, TASK_ACTION,
from notifications.constants import (ASSOCIATE_REQUEST, ASSOCIATE_JUNIOR, TASK_ACTION,
)
from web_admin.models import ArticleCard
@ -323,7 +323,7 @@ class AddJuniorSerializer(serializers.ModelSerializer):
"""Notification email"""
junior_notification_email.delay(email, full_name, email, password)
# push notification
send_notification.delay(JUNIOR_ADDED, None, None, junior_data.auth.id, {})
send_notification.delay(ASSOCIATE_JUNIOR, None, None, junior_data.auth.id, {})
return junior_data