FIX: can_tag method called without guardian variable

This commit is contained in:
Vinoth Kannan 2018-02-21 21:22:56 +05:30
parent d4b2e840cb
commit 776ab73a8d
1 changed files with 1 additions and 1 deletions

View File

@ -4,7 +4,7 @@ module DiscourseTagging
TAGS_FILTER_REGEXP = /[\/\?#\[\]@!\$&'\(\)\*\+,;=\.%\\`^\s|\{\}"<>]+/ # /?#[]@!$&'()*+,;=.%\`^|{}"<>
def self.tag_topic_by_names(topic, guardian, tag_names_arg, append: false)
if can_tag?(topic)
if guardian.can_tag?(topic)
tag_names = DiscourseTagging.tags_for_saving(tag_names_arg, guardian) || []
old_tag_names = topic.tags.pluck(:name) || []