FIX: don't publish notifications_state when user has been deleted
This commit is contained in:
parent
d23229df85
commit
338d39265a
|
@ -201,7 +201,11 @@ class Notification < ActiveRecord::Base
|
|||
protected
|
||||
|
||||
def refresh_notification_count
|
||||
user.reload.publish_notifications_state
|
||||
begin
|
||||
user.reload.publish_notifications_state
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
# happens when we delete a user
|
||||
end
|
||||
end
|
||||
|
||||
def send_email
|
||||
|
|
Loading…
Reference in New Issue