diff --git a/application/features/bootstrap/EmailContext.php b/application/features/bootstrap/EmailContext.php index 64d0f8aa..2864d6c0 100644 --- a/application/features/bootstrap/EmailContext.php +++ b/application/features/bootstrap/EmailContext.php @@ -1379,12 +1379,13 @@ public function iSentAnExternalGroupsSyncErrorEmailHourAgo($numberOfHours) $numberOfHours ); - /** @var EmailLog[] $emailLogs */ - $emailLogs = EmailLog::find()->all(); + $emailLogs = EmailLog::findAll([ + 'message_type' => EmailLog::MESSAGE_TYPE_EXT_GROUP_SYNC_ERRORS, + ]); Assert::notEmpty( $emailLogs, - 'No email logs found to update the sent_at value for' + 'No external-group sync-error email logs found to set the sent_at value for' ); foreach ($emailLogs as $emailLog) {