From 0a49a9a919ada940dd13671219a582af48c6790d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 15 Jan 2020 20:05:24 +0800 Subject: [PATCH] 1 --- app/controllers/item_banks_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/item_banks_controller.rb b/app/controllers/item_banks_controller.rb index 86b1523c3..f108c1fad 100644 --- a/app/controllers/item_banks_controller.rb +++ b/app/controllers/item_banks_controller.rb @@ -43,8 +43,9 @@ class ItemBanksController < ApplicationController ApplyAction.where(container_type: "ItemBank", container_id: @item.id).destroy_all if @item.item_type == "PROGRAM" @item.container&.destroy! + else + @item.destroy! end - @item.destroy! render_ok end end