Fix #3473: Validation warnings for no artist/copyright are still shown on upload failure.

This commit is contained in:
evazion
2017-12-28 18:17:34 -06:00
parent 59cd4d71d3
commit 857fa24697

View File

@@ -56,7 +56,10 @@ class UploadsController < ApplicationController
if @upload.errors.empty?
post = @upload.process!
flash[:notice] = post.warnings.full_messages.join(".\n \n") if post.present? && post.warnings.any?
if post.present? && post.valid? && post.warnings.any?
flash[:notice] = post.warnings.full_messages.join(".\n \n")
end
end
save_recent_tags