Skip to content

Commit

Permalink
fix bug: email and cellphone check
Browse files Browse the repository at this point in the history
  • Loading branch information
CAOLINAN committed Jun 7, 2018
1 parent ba06754 commit 7084d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ulordapi/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ def user_regist(self, username, password, cellphone=None, email=None, wallet=Non
# check arg
if User.query.filter_by(username=username).first() is not None:
return _errcodes.get(60000)
if email and utils.isMail(email):
if email and not utils.isMail(email):
return _errcodes.get(60105)
if cellphone and utils.isCellphone(cellphone):
if cellphone and not utils.isCellphone(cellphone):
return _errcodes.get(60106)

user = User(username=username)
Expand Down

0 comments on commit 7084d87

Please sign in to comment.