From 9977cce7d04e4e451c78a2f02151fa9d54a84f9d Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:51:09 +0000 Subject: [PATCH] Location - remove action link --- app/views/locations/check_answers.html.erb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/views/locations/check_answers.html.erb b/app/views/locations/check_answers.html.erb index 089ac37bd..497abf63f 100644 --- a/app/views/locations/check_answers.html.erb +++ b/app/views/locations/check_answers.html.erb @@ -29,8 +29,10 @@ <% else %> <% row.with_value { details_html(attr, @location) if user_can_edit_scheme?(current_user, @scheme) } %> <% end %> - <% if LocationPolicy.new(current_user, @location).update? %> + <% if LocationPolicy.new(current_user, @location).update? && attr[:value] %> <% row.with_action(text: location_action_text(attr, @location), href: location_edit_path(@location, attr[:attribute])) %> + <% else %> + <% row.with_action %> <% end %> <% end %> <% end %>