From 7049e8e7233b9ff7d76a4040264f0c9af173f68b Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Fri, 30 Dec 2022 06:09:58 -0800 Subject: [PATCH] Fix bug introduced in last PR --- app/controllers/api/v1/grid_weapons_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/grid_weapons_controller.rb b/app/controllers/api/v1/grid_weapons_controller.rb index 93b1352..fdcc392 100644 --- a/app/controllers/api/v1/grid_weapons_controller.rb +++ b/app/controllers/api/v1/grid_weapons_controller.rb @@ -41,8 +41,10 @@ module Api end # Render the grid weapon view as a string and assign it to a variable + return unless weapon.save! + grid_weapon_view = render_grid_weapon_view(weapon, conflict_position) - render json: grid_weapon_view, status: :created if weapon.save! + render json: grid_weapon_view, status: :created end def resolve