make user mobile num nullable if user has email_auth enabled

This commit is contained in:
Leo Hemsted
2017-11-09 14:18:47 +00:00
parent e14275c19a
commit 15bf888624
6 changed files with 185 additions and 17 deletions

View File

@@ -94,7 +94,7 @@ def register_errors(blueprint):
current_app.logger.exception(e)
if hasattr(e, 'orig') and hasattr(e.orig, 'pgerror') and e.orig.pgerror and \
('duplicate key value violates unique constraint "services_name_key"' in e.orig.pgerror or
'duplicate key value violates unique constraint "services_email_from_key"' in e.orig.pgerror):
'duplicate key value violates unique constraint "services_email_from_key"' in e.orig.pgerror):
return jsonify(
result='error',
message={'name': ["Duplicate service name '{}'".format(