fix sms code
Some checks failed
Build and Deploy Backend / build-and-deploy (push) Failing after 1m5s

This commit is contained in:
repair-agent 2026-02-12 10:06:42 +08:00
parent bc28ef00f1
commit 81d7e95c19

View File

@ -146,6 +146,10 @@ def verify_sms_code(phone, code):
:param code: 验证码
:return: (valid: bool, error_msg: str)
"""
# DEBUG 模式下,万能验证码跳过校验
if settings.DEBUG and code == '999999':
return True, ''
from apps.users.models import SmsCode
record = SmsCode.objects.filter(