From 5a50c9ac48f03c9a665b552c44de26995cbf7521 Mon Sep 17 00:00:00 2001 From: Harpreet Kataria Date: Mon, 6 Jul 2020 17:34:05 -0400 Subject: [PATCH] only set `object_ids` if in a form. When clicking on a breadcrumb link while in a form without cancelling out of the form, code was setting `object_ids` from previously stored data in `@edit` causing not to load correct records in the list view. Fixes #5383 --- app/controllers/application_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 399ed1eb88d..ab2c8ca5cc0 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -1216,7 +1216,7 @@ def get_view(db, options = {}, fetch_data = false) if !fetch_data && @report_data_additional_options.nil? process_show_list_options(options, db) end - unless @edit.nil? + if @in_a_form && @edit.present? object_ids = @edit[:object_ids] unless @edit[:object_ids].nil? object_ids = @edit[:pol_items] unless @edit[:pol_items].nil? end