Skip to content

Commit

Permalink
bug fix for close out email notification
Browse files Browse the repository at this point in the history
  • Loading branch information
VineetBala-AOT authored Sep 16, 2024
1 parent 5d8fab4 commit bd2ff4a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions met-api/src/met_api/services/engagement_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,12 @@ def _get_scope_options(user_roles, has_team_access):
def close_engagements_due():
"""Close published engagements that are due for a closeout."""
engagements = EngagementModel.close_engagements_due()
results = [EngagementService._send_closeout_emails(engagement) for engagement in engagements]
return results
for engagement in engagements:
engagement_settings: EngagementSettingsModel =\
EngagementSettingsModel.find_by_id(engagement.id)
if engagement_settings:
if engagement_settings.send_report:
EngagementService._send_closeout_emails(engagement)

@staticmethod
def publish_scheduled_engagements():
Expand Down

0 comments on commit bd2ff4a

Please sign in to comment.