Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

Commit

Permalink
Merge aee87e6 into 2921d29
Browse files Browse the repository at this point in the history
  • Loading branch information
Callek committed Apr 16, 2015
2 parents 2921d29 + aee87e6 commit 86b6a41
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions relengapi/blueprints/slaveloan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ def new_loan_from_admin(body):
ipaddress=body.ipaddress)
h = Humans.as_unique(session, ldap=body.LDAP,
bugzilla=body.bugzilla)
if h.bugzilla != body.bugzilla:
h.bugzilla = body.bugzilla
except sa.exc.IntegrityError:
raise InternalServerError("Integrity Error from Database, please retry.")

Expand Down Expand Up @@ -157,6 +159,8 @@ def new_loan_request(body):
try:
h = Humans.as_unique(session, ldap=body.ldap_email,
bugzilla=body.bugzilla_email)
if h.bugzilla != body.bugzilla_email:
h.bugzilla = body.bugzilla_email
except sa.exc.IntegrityError:
raise InternalServerError("Integrity Error from Database, please retry.")

Expand Down

0 comments on commit 86b6a41

Please sign in to comment.