Skip to content

Commit

Permalink
[MDS-6114] Fix bug on additional contacts (#3275)
Browse files Browse the repository at this point in the history
fix bug on additional contacts
  • Loading branch information
henryoforeh-dev authored Oct 23, 2024
1 parent 8952af4 commit c1bf81e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/core-api/app/api/services/ams_api_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def create_new_ams_authorization(cls,
# Dynamically add additional contacts as contact1, contact2, etc.
if(len(contacts)) > 1:
for i, contact in enumerate(contacts[1:], start=1):
contact_key = f'contact{i + 1}'
contact_key = f'contact{i}'
ams_authorization_data[contact_key] = cls.__set_additional_contact_details(contact)

payload = json.dumps(ams_authorization_data)
Expand Down Expand Up @@ -487,7 +487,7 @@ def create_amendment_ams_authorization(cls,
# Dynamically add additional contacts as contact1, contact2, etc.
if (len(contacts)) > 1:
for i, contact in enumerate(contacts[1:], start=1):
contact_key = f'contact{i + 1}'
contact_key = f'contact{i}'
ams_authorization_data[contact_key] = cls.__set_additional_contact_details(contact)

payload = json.dumps(ams_authorization_data)
Expand Down

0 comments on commit c1bf81e

Please sign in to comment.