Fix #4969: Tag changes made by replacements wipe out edits done at the same time.
Lock the post during replacement to ensure we have the latest version of the tags and to ensure nobody else can modify the post until after the replacement is finished.
This commit is contained in:
@@ -12,8 +12,6 @@ class PostReplacement < ApplicationRecord
|
||||
|
||||
def initialize_fields
|
||||
self.original_url = post.source
|
||||
self.tags = "#{post.tag_string} #{tags}"
|
||||
|
||||
self.old_file_ext = post.file_ext
|
||||
self.old_file_size = post.file_size
|
||||
self.old_image_width = post.image_width
|
||||
|
||||
Reference in New Issue
Block a user