Skip to content
This repository has been archived by the owner on Jan 28, 2022. It is now read-only.

FIX: Retry creating tags #8

Merged
merged 2 commits into from May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/discourse_dev/tag.rb
Expand Up @@ -11,6 +11,13 @@ def initialize
super(::Tag, DiscourseDev.config.tag[:count])
end

def create!
super
rescue ActiveRecord::RecordInvalid => e
# If the name is taken, try again
retry
end

def populate!
return unless SiteSetting.tagging_enabled
super
Expand Down