diff --git a/met-api/src/met_api/services/engagement_service.py b/met-api/src/met_api/services/engagement_service.py index 9e8a69145..1728703c9 100644 --- a/met-api/src/met_api/services/engagement_service.py +++ b/met-api/src/met_api/services/engagement_service.py @@ -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():