mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 03:18:23 +00:00
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…
x
Reference in New Issue
Block a user