mirror of
https://github.com/discourse/discourse.git
synced 2025-04-28 01:24:33 +08:00
FIX: posting my fail because there are no tags
This commit is contained in:
parent
2d2bf4dd56
commit
1625b08c86
@ -27,7 +27,7 @@ module DiscourseTagging
|
|||||||
|
|
||||||
return [] unless guardian.can_tag_topics?
|
return [] unless guardian.can_tag_topics?
|
||||||
|
|
||||||
return unless tags
|
return unless tags.present?
|
||||||
|
|
||||||
tags.map! {|t| clean_tag(t) }
|
tags.map! {|t| clean_tag(t) }
|
||||||
tags.delete_if {|t| t.blank? }
|
tags.delete_if {|t| t.blank? }
|
||||||
|
@ -438,6 +438,7 @@ class PostCreator
|
|||||||
end
|
end
|
||||||
|
|
||||||
def auto_notify_for_tags
|
def auto_notify_for_tags
|
||||||
|
if SiteSetting.tagging_enabled
|
||||||
tags = DiscourseTagging.tags_for_saving(@opts[:tags], @guardian)
|
tags = DiscourseTagging.tags_for_saving(@opts[:tags], @guardian)
|
||||||
if tags.present?
|
if tags.present?
|
||||||
@topic.custom_fields.update(DiscourseTagging::TAGS_FIELD_NAME => tags)
|
@topic.custom_fields.update(DiscourseTagging::TAGS_FIELD_NAME => tags)
|
||||||
@ -445,6 +446,7 @@ class PostCreator
|
|||||||
DiscourseTagging.auto_notify_for(tags, @topic)
|
DiscourseTagging.auto_notify_for(tags, @topic)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def new_topic?
|
def new_topic?
|
||||||
@opts[:topic_id].blank?
|
@opts[:topic_id].blank?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user