A platform for community discussion. Free, open, simple.
warn if missing user option record
Sam5bf116e719fc
diff --git a/app/services/notification_emailer.rb b/app/services/notification_emailer.rbindex 9b593f3a177..e51e18fb0f2 100644--- a/app/services/notification_emailer.rb+++ b/app/services/notification_emailer.rb@@ -72,6 +72,12 @@ class NotificationEmailerenddef enqueue_private(type, delay = private_delay)++ if notification.user.user_option.nil?+ Rails.logger.warn("Missing user option record for user id: #{notification.user.id}")+ return+ end+return unless notification.user.user_option.email_private_messages?perform_enqueue(type, delay)end