From 6f5aef1cef754fb428cdd545af6ad4a33ff1fe5d Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 23 Feb 2022 02:43:21 -0600 Subject: [PATCH] uploads: fix being redirected to blank page when rating is not selected. Fix the upload page redirecting you to a blank page if you forgot to select the rating on a multi-asset upload. ref: https://danbooru.donmai.us/forum_posts/206365 --- app/controllers/posts_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index bc49b5018..a92b85ca3 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -80,10 +80,8 @@ class PostsController < ApplicationController flash[:notice] = "Duplicate of post ##{@original_post.id}; merging tags" redirect_to @original_post else - @upload = @upload_media_asset.upload - @media_asset = @upload_media_asset.media_asset flash[:notice] = @post.errors.full_messages.join("; ") - respond_with(@post, render: { template: "uploads/show" }) + respond_with(@post, render: { template: "upload_media_assets/show" }) end end