float ttl

This commit is contained in:
Sayyid Hamid Mahdavi 2026-04-29 17:00:56 +03:30
parent 28ae006b5d
commit 1981122f28

View file

@ -80,7 +80,7 @@ class RequestOTPSerializer(serializers.ModelSerializer):
def get_ttl(self, obj: User): def get_ttl(self, obj: User):
if obj.otp_expire > timezone.now(): if obj.otp_expire > timezone.now():
ttl = obj.otp_expire - timezone.now() ttl = obj.otp_expire - timezone.now()
result = int(ttl.total_seconds()) result = ttl.total_seconds()
else: else:
result = 0 result = 0