mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Provide an error message if no valid tags were selected
This commit is contained in:
@@ -83,7 +83,11 @@ module DiscourseTagging
|
||||
return false
|
||||
end
|
||||
|
||||
return false if tags.size == 0
|
||||
if tags.size == 0
|
||||
topic.errors.add(:base, I18n.t("tags.forbidden.invalid", count: new_tag_names.size))
|
||||
return false
|
||||
end
|
||||
|
||||
topic.tags = tags
|
||||
else
|
||||
# validate minimum required tags for a category
|
||||
|
||||
Reference in New Issue
Block a user