FIX: tags created from category modal need to be normalized as usual

This commit is contained in:
Neil Lalonde 2016-06-01 17:05:15 -04:00
parent 31c0a22266
commit c3ceb6ef7d
1 changed files with 2 additions and 1 deletions

View File

@ -315,7 +315,8 @@ SQL
end
end
def allowed_tags=(tag_names)
def allowed_tags=(tag_names_arg)
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, Guardian.new(Discourse.system_user)) || []
if self.tags.pluck(:name).sort != tag_names.sort
self.tags = Tag.where(name: tag_names).all
if self.tags.size < tag_names.size