This commit is contained in:
Kenneth Kehl
2023-07-10 15:38:31 -07:00
parent 3ac2feacfe
commit 015a550424
3 changed files with 10 additions and 9 deletions

View File

@@ -115,6 +115,7 @@ def update_organization(organization_id):
error = str(e.__dict__['orig'])
if "duplicate key" in error and "domain_pkey" in error:
return jsonify(result='error', message='Domain already exists'), 400
# 'organisation' here because of ix_organisation_name index in db
elif "duplicate key" in error and "organisation_name" in error:
return jsonify(result='error', message='Organization name already exists'), 400
else: