Skip to content

Commit 5fb7e00

Browse files
authored
32678 - GOVM account can't receive email if no admin email set - fix (#3682)
1 parent 35e6922 commit 5fb7e00

File tree

1 file changed

+4
-0
lines changed
  • auth-api/src/auth_api/services

1 file changed

+4
-0
lines changed

auth-api/src/auth_api/services/org.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1006,6 +1006,10 @@ def approve_or_reject(org_id: int, is_approved: bool, client_id: int, task_actio
10061006
# Find admin email addresses
10071007
admin_emails = UserService.get_admin_emails_for_org(org_id)
10081008
origin_url = current_app.config.get("WEB_APP_URL")
1009+
if org.access_type == AccessType.GOVM.value:
1010+
client = UserModel.find_by_id(client_id)
1011+
admin_emails = client.email
1012+
10091013
if admin_emails != "":
10101014
if org.access_type in (AccessType.EXTRA_PROVINCIAL.value, AccessType.REGULAR_BCEID.value):
10111015
Org.send_approved_rejected_notification(admin_emails, org.name, org.id, org.status_code, client_id)

0 commit comments

Comments
 (0)