Fix #3981: Inconsistency between posts and pools.

This commit is contained in:
evazion
2018-11-10 12:37:08 -06:00
parent 684e2bdbad
commit eade33fa7c
2 changed files with 10 additions and 2 deletions

View File

@@ -241,8 +241,9 @@ class Pool < ApplicationRecord
end
def synchronize
added = post_ids - post_ids_was
removed = post_ids_was - post_ids
post_ids_before = post_ids_before_last_save || post_ids_was
added = post_ids - post_ids_before
removed = post_ids_before - post_ids
added.each do |post_id|
post = Post.find(post_id)