Fix #4444: Pool navigation is broken when post appears twice in same pool.

Don't allow the same post to be added to the same pool twice.

This was only legitimately needed in a handful of cases. It was much
more common for posts to be mistakenly added to the same pool twice.
This commit is contained in:
evazion
2022-05-01 01:55:03 -05:00
parent 4542f38023
commit f4ad1b09da
2 changed files with 5 additions and 2 deletions

View File

@@ -129,7 +129,7 @@ class Pool < ApplicationRecord
end
def normalize_post_ids
self.post_ids = post_ids.uniq if is_collection?
self.post_ids = post_ids.uniq
end
def revert_to!(version)