mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-27 17:14:55 +00:00
sonar issues
This commit is contained in:
@ -8,11 +8,11 @@ from django.utils import timezone
|
||||
from rest_framework_simplejwt.tokens import RefreshToken
|
||||
|
||||
"""Import django app"""
|
||||
from account.utils import send_otp_email, generate_alphanumeric_code
|
||||
from account.utils import send_otp_email, generate_code
|
||||
from junior.models import Junior, JuniorPoints
|
||||
from guardian.tasks import generate_otp
|
||||
from base.messages import ERROR_CODE, SUCCESS_CODE
|
||||
from base.constants import PENDING, IN_PROGRESS, REJECTED, REQUESTED, COMPLETED, NUMBER
|
||||
from base.constants import PENDING, IN_PROGRESS, REJECTED, REQUESTED, COMPLETED, NUMBER, JUN, ZOD
|
||||
from guardian.models import Guardian, JuniorTask
|
||||
from account.models import UserEmailOtp
|
||||
from junior.utils import junior_notification_email, junior_approval_mail
|
||||
@ -275,8 +275,8 @@ class AddJuniorSerializer(serializers.ModelSerializer):
|
||||
junior_data = Junior.objects.create(auth=user_data, gender=validated_data.get('gender'),
|
||||
dob=validated_data.get('dob'), is_invited=True,
|
||||
relationship=validated_data.get('relationship'),
|
||||
junior_code=generate_alphanumeric_code(6),
|
||||
referral_code=generate_alphanumeric_code(6),
|
||||
junior_code=generate_code(JUN, user_data.id),
|
||||
referral_code=generate_code(ZOD, user_data.id),
|
||||
referral_code_used=guardian_data.referral_code)
|
||||
"""Generate otp"""
|
||||
otp_value = generate_otp()
|
||||
|
||||
Reference in New Issue
Block a user