From 8c1e4bfb580b74d83b397d892b8a7c844e5d6c76 Mon Sep 17 00:00:00 2001 From: Jeff Godin Date: Fri, 28 Jan 2022 17:54:38 -0500 Subject: [PATCH] Avoid fleshing standing penalty org unit children When fleshing the org unit on standing penalties, exclude child org units. We don't need them, and they can cause issues when your standing penalty has a Depth of "Everywhere": you end up with a full copy of the org unit tree, and you will include this when editing and saving the user. Signed-off-by: Jeff Godin Signed-off-by: Chris Sharp --- Open-ILS/web/js/ui/default/staff/services/patron_search.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/web/js/ui/default/staff/services/patron_search.js b/Open-ILS/web/js/ui/default/staff/services/patron_search.js index 07e961eefa..75706f7822 100644 --- a/Open-ILS/web/js/ui/default/staff/services/patron_search.js +++ b/Open-ILS/web/js/ui/default/staff/services/patron_search.js @@ -259,7 +259,10 @@ function($q , $timeout , $location , egCore, egUser , egConfirmDialog , $locale user.standing_penalties(), function(penalty) { if (!angular.isObject(penalty.org_unit())) - penalty.org_unit(egCore.org.get(penalty.org_unit())); + // clone the org unit IDL object and set children to an empty array + org_unit = egCore.idl.Clone(egCore.org.get(penalty.org_unit())); + org_unit.children([]) + penalty.org_unit(org_unit); } ); -- 2.11.0