Validate that we have a valid JSON body
This commit is contained in:
parent
ea5b998168
commit
a5ff765f3b
2 changed files with 6 additions and 3 deletions
|
@ -166,8 +166,7 @@ def _create_user(username, email):
|
|||
pass
|
||||
|
||||
try:
|
||||
new_user = User.create(username=username, email=email)
|
||||
return new_user
|
||||
return User.create(username=username, email=email)
|
||||
except Exception as ex:
|
||||
raise DataModelException(ex.message)
|
||||
|
||||
|
|
Reference in a new issue