warn if missing user option record
This commit is contained in:
parent
988b13ac77
commit
5bf116e719
|
@ -72,6 +72,12 @@ class NotificationEmailer
|
||||||
end
|
end
|
||||||
|
|
||||||
def enqueue_private(type, delay = private_delay)
|
def 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?
|
return unless notification.user.user_option.email_private_messages?
|
||||||
perform_enqueue(type, delay)
|
perform_enqueue(type, delay)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue