From 5766628549169172f19ce79ea0d1fdf194bb72e9 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 15 Jul 2010 21:34:06 +0000 Subject: [PATCH] allow open-ils.circ.hold.update.batch to apply nulls to fields git-svn-id: svn://svn.open-ils.org/ILS/trunk@16948 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm index 6fdcae91a..4ecde194c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm @@ -741,7 +741,13 @@ sub update_hold_impl { unless($hold) { $hold = $e->retrieve_action_hold_request($values->{id}) or return $e->die_event; - $hold->$_($values->{$_}) for keys %$values; + for my $k (keys %$values) { + if (defined $values->{$k}) { + $hold->$k($values->{$k}); + } else { + my $f = "clear_$k"; $hold->$f(); + } + } } my $orig_hold = $e->retrieve_action_hold_request($hold->id) -- 2.11.0