LP#1976126: Don't send useless (big) user data
authorMike Rylander <mrylander@gmail.com>
Fri, 27 May 2022 20:48:41 +0000 (16:48 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Sat, 28 Jan 2023 19:33:44 +0000 (14:33 -0500)
When saving a user in the AngularJS UIs, we currently send the notes,
usr_activity, and standing_penalties fields to the actor service.
However, that's not how those get updated, and with large sets that can
cause problems.  This commit removes those fields before saving the
user.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js

index 31bc4fe..bebbded 100644 (file)
@@ -1207,6 +1207,11 @@ angular.module('egCoreMod')
 
         if (!patron.isnew()) patron.ischanged(true);
 
+        // Make sure these are empty, we don't update them this way
+        patron.notes([]);
+        patron.usr_activity([]);
+        patron.standing_penalties([]);
+
         return egCore.net.request(
             'open-ils.actor', 
             'open-ils.actor.patron.update',