mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 14:17:57 +08:00
FIX: Avoid creating a post revision when topic tags have not changed. (#13881)
Co-authored-by: jmperez127 <jmperez127@gmail.com>
This commit is contained in:

committed by
GitHub

parent
c94879ea43
commit
2b5625bbf0
@ -372,6 +372,11 @@ class TopicsController < ApplicationController
|
||||
changes.delete(:title) if topic.title == changes[:title]
|
||||
changes.delete(:category_id) if topic.category_id.to_i == changes[:category_id].to_i
|
||||
|
||||
if Tag.include_tags?
|
||||
topic_tags = topic.tags.map(&:name).sort
|
||||
changes.delete(:tags) if changes[:tags]&.sort == topic_tags
|
||||
end
|
||||
|
||||
success = true
|
||||
|
||||
if changes.length > 0
|
||||
|
Reference in New Issue
Block a user