diff --git a/app/models/user_action_observer.rb b/app/models/user_action_observer.rb index 76ea7b8b3c6..84afb7049a6 100644 --- a/app/models/user_action_observer.rb +++ b/app/models/user_action_observer.rb @@ -46,8 +46,8 @@ class UserActionObserver < ActiveRecord::Observer UserAction::EDIT end - # like is skipped - return unless action && post && user + # skip any invalid items, eg failed to save post and so on + return unless action && post && user && post.id row = { action_type: action,