From 4f5cb0ba7059315ede1b5a45918d559b88c24d28 Mon Sep 17 00:00:00 2001 From: evazion Date: Tue, 28 Aug 2018 17:04:20 -0500 Subject: [PATCH] Post#has_artist_tag: fix "artist tag is required" triggering incorrectly. Fixes the "Artist tag is required" upload warning to only trigger when the source is from a first-party site. --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index a153a77c6..240937208 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1793,8 +1793,8 @@ class Post < ApplicationRecord return if source !~ %r!\Ahttps?://! return if has_tag?("artist_request") || has_tag?("official_art") return if tags.any? { |t| t.category == Tag.categories.artist } + return if Sources::Strategies.find(source).is_a?(Sources::Strategies::Null) - site = Sources::Strategies.find(source) self.warnings[:base] << "Artist tag is required. Create a new tag with [[artist:]]. Ask on the forum if you need naming help" end