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 <jgodin@tadl.org>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
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);
}
);