mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-02-17 04:01:29 -05:00
PERF: don't count all likes twice on like
This commit is contained in:
parent
8252f4e110
commit
1edb5919fa
1 changed files with 6 additions and 3 deletions
|
@ -280,9 +280,12 @@ SQL
|
|||
end
|
||||
|
||||
# agree with other flags
|
||||
PostAction.agree_flags!(post, user) if staff_took_action
|
||||
# update counters
|
||||
post_action.try(:update_counters)
|
||||
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 a new issue