mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-07-15 18:07:02 +00:00
jira-28 notification
This commit is contained in:
@ -18,6 +18,10 @@ from junior.models import Junior, JuniorPoints
|
||||
from .models import JuniorTask
|
||||
# Import app from celery
|
||||
from zod_bank.celery import app
|
||||
# notification's constant
|
||||
from notifications.constants import REFERRAL_POINTS
|
||||
# send notification function
|
||||
from notifications.utils import send_notification
|
||||
# Define upload image on
|
||||
# ali baba cloud
|
||||
# firstly save image
|
||||
@ -85,6 +89,8 @@ def update_referral_points(referral_code, referral_code_used):
|
||||
junior_query.total_points = junior_query.total_points + NUMBER['five']
|
||||
junior_query.referral_points = junior_query.referral_points + NUMBER['five']
|
||||
junior_query.save()
|
||||
send_notification.delay(REFERRAL_POINTS, None, junior_queryset.auth.id, {})
|
||||
|
||||
|
||||
|
||||
@app.task
|
||||
|
Reference in New Issue
Block a user