Fix #4107: Can't create artist entry if tag already has a wiki #4107

This commit is contained in:
evazion
2019-08-01 19:34:21 -05:00
parent 692981e964
commit bcaefa0a7e
2 changed files with 0 additions and 20 deletions

View File

@@ -12,7 +12,6 @@ class Artist < ApplicationRecord
after_save :update_wiki
after_save :clear_url_string_changed
validates :name, tag_name: true, uniqueness: true
validate :validate_wiki, :on => :create
belongs_to_creator
has_many :members, :class_name => "Artist", :foreign_key => "group_name", :primary_key => "name"
has_many :urls, :dependent => :destroy, :class_name => "ArtistUrl", :autosave => true
@@ -391,13 +390,6 @@ class Artist < ApplicationRecord
wiki_page.save
end
end
def validate_wiki
if WikiPage.titled(name).exists?
errors.add(:name, "conflicts with a wiki page")
return false
end
end
end
module TagMethods