uploads: fix tag warnings not being shown after upload.
Fix the warnings about not having enough tags, or not having an artist or copyright tag, not being shown after creating a new post.
This commit is contained in:
@@ -68,6 +68,10 @@ class PostsController < ApplicationController
|
|||||||
@post.save
|
@post.save
|
||||||
|
|
||||||
if @post.errors.none?
|
if @post.errors.none?
|
||||||
|
if @post.warnings.any?
|
||||||
|
flash[:notice] = @post.warnings.full_messages.join(".\n \n")
|
||||||
|
end
|
||||||
|
|
||||||
respond_with(@post)
|
respond_with(@post)
|
||||||
elsif @post.errors.of_kind?(:md5, :taken)
|
elsif @post.errors.of_kind?(:md5, :taken)
|
||||||
@original_post = Post.find_by!(md5: @post.md5)
|
@original_post = Post.find_by!(md5: @post.md5)
|
||||||
|
|||||||
Reference in New Issue
Block a user