Remove unused imports and clean up OTP message formatting in CreateTemporaryUserView
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 3m29s

This commit is contained in:
i701 2025-05-31 14:01:56 +05:00
parent cdd032ac54
commit 907b713082
Signed by: i701
GPG Key ID: 54A0DA1E26D8E587

View File

@ -1,5 +1,4 @@
# django imports
import pprint
from django.contrib.auth import login
# rest_framework imports
@ -32,8 +31,7 @@ from typing import cast, Dict, Any
from django.core.mail import send_mail
from django.db.models import Q
from api.notifications import send_otp
from .tasks import add, add_new_devices_to_omada
from devices.models import Device
from .tasks import add
# local apps import
from .serializers import (
@ -197,7 +195,6 @@ class CreateTemporaryUserView(generics.CreateAPIView):
otp = temp_user.generate_otp()
send_otp(
str(temp_user.t_mobile),
otp,
f"Your Registration SARLink OTP: {otp}. \nExpires at {formatted_time}. \n\n- SAR Link",
)
serializer = self.get_serializer(temp_user)