From 740a81be7c5103deeac0a9978d1fc0240c7e061b Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 3 Jul 2020 13:42:15 +0200 Subject: [PATCH] Fix OTP verification --- database/crud.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database/crud.py b/database/crud.py index 021b447..e264bcb 100644 --- a/database/crud.py +++ b/database/crud.py @@ -66,8 +66,8 @@ async def activate_account(data: OTPSchema): async def verify_otp(data: OTPSchema): user = fetch_otp(data=data) - stored.otp = user.otp - if stored_otp == otp: - activate_account(mobile=mobile) + stored_otp = user.otp + if stored_otp == data.otp: + activate_account(mobile=data.mobile) return True return False