PERF: don't count all likes twice on like
This commit is contained in:
parent
8252f4e110
commit
1edb5919fa
|
@ -280,9 +280,12 @@ SQL
|
|||
end
|
||||
|
||||
# agree with other flags
|
||||
PostAction.agree_flags!(post, user) if staff_took_action
|
||||
if staff_took_action
|
||||
PostAction.agree_flags!(post, user)
|
||||
|
||||
# update counters
|
||||
post_action.try(:update_counters)
|
||||
end
|
||||
|
||||
post_action
|
||||
rescue ActiveRecord::RecordNotUnique
|
||||
|
|
Loading…
Reference in New Issue