Skip to content

Commit

Permalink
20087 - Put in additional emails for locking (#2944)
Browse files Browse the repository at this point in the history
  • Loading branch information
seeker25 authored Aug 1, 2024
1 parent 6a15e94 commit f5f83f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,12 @@ def handle_nsf_lock_unlock_account(message_type, email_msg):
current_app.logger.debug('Lock account message received')
template_name = TemplateType.NSF_LOCK_ACCOUNT_TEMPLATE_NAME.value
org_id = email_msg.get('accountId')
admin_coordinator_emails = get_member_emails(org_id, (ADMIN, COORDINATOR))
emails = get_member_emails(org_id, (ADMIN, COORDINATOR))
if additional_emails := email_msg.get('additionalEmails'):
emails += ',' + additional_emails
subject = SubjectType.NSF_LOCK_ACCOUNT_SUBJECT.value
logo_url = email_msg.get('logo_url')
email_dict = common_mailer.process(org_id, admin_coordinator_emails, template_name,
email_dict = common_mailer.process(org_id, emails, template_name,
subject, logo_url=logo_url)
process_email(email_dict)
elif message_type == QueueMessageTypes.NSF_UNLOCK_ACCOUNT.value:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ def process_pay_lock_unlock_event(event_message: SimpleCloudEvent):
org.status_code = OrgStatus.NSF_SUSPENDED.value
org.suspended_on = datetime.now()
org.suspension_reason_code = queue_data.get('suspensionReasonCode', None)
data['additionalEmails'] = queue_data.get('additionalEmails', None)
if skip_notification is False:
publish_to_mailer(QueueMessageTypes.NSF_LOCK_ACCOUNT.value, data, QueueSources.AUTH_QUEUE.value)
elif message_type == QueueMessageTypes.NSF_UNLOCK_ACCOUNT.value:
Expand Down

0 comments on commit f5f83f1

Please sign in to comment.