diff --git a/src/backend/core/recording/event/notification.py b/src/backend/core/recording/event/notification.py index 617ea06d..9c01c270 100644 --- a/src/backend/core/recording/event/notification.py +++ b/src/backend/core/recording/event/notification.py @@ -83,7 +83,7 @@ class NotificationService: fail_silently=False, ) except smtplib.SMTPException as exception: - logger.error("notification to %s was not sent: %s", emails, exception) + logger.error("notification could not be sent: %s", exception) return False return True diff --git a/src/backend/core/tests/recording/event/test_notification.py b/src/backend/core/tests/recording/event/test_notification.py index 0fd8dcc7..7c56af53 100644 --- a/src/backend/core/tests/recording/event/test_notification.py +++ b/src/backend/core/tests/recording/event/test_notification.py @@ -150,9 +150,9 @@ def test_notify_user_by_email_smtp_exception(mocked_current_site, caplog): """Test email notification when an exception occurs.""" recording = factories.RecordingFactory(room__name="Conference Room A") - owner = factories.UserRecordingAccessFactory( + factories.UserRecordingAccessFactory( recording=recording, role=models.RoleChoices.OWNER - ).user + ) notification_service = NotificationService() @@ -164,4 +164,4 @@ def test_notify_user_by_email_smtp_exception(mocked_current_site, caplog): assert result is False mock_send_mail.assert_called_once() - assert f"notification to ['{owner.email}'] was not sent" in caplog.text + assert "notification could not be sent:" in caplog.text