Explorar el Código

fix: 修复注册判断邮箱是否存在的错误

SongZihuan hace 2 años
padre
commit
0566913435
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/auth.py

+ 1 - 1
app/auth.py

@@ -58,7 +58,7 @@ class RegisterForm(EmailPasswd):
     submit = SubmitField("注册")
 
     def validate_email(self, field):
-        if User(field.data) is not None:
+        if User(field.data).info[2] != -1:
             raise ValidationError("邮箱已被注册")