From c7caa8b898b39b3ca8bf6c9323ccd7be602a918f Mon Sep 17 00:00:00 2001 From: Jason Stephenson Date: Mon, 9 Sep 2013 13:16:34 -0400 Subject: [PATCH] Cleanse the stop_fines_time argument in AssetCommon->set_item_lost_or_lod. We should be given either an ISO date or now. In the former case, this makes sure that the date is formatted how PostgreSQL likes it. Signed-off-by: Jason Stephenson --- Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm index d0b7167a0b..289c4cff8c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm @@ -686,6 +686,9 @@ sub set_item_long_overdue { sub set_item_lost_or_lod { my ($class, $e, $copy_id, %args) = @_; + # Cleanse the stop_fines_time. + $args{stop_fines_time} = cleanse_ISO8601($args{stop_fines_time}); + my $copy = $e->retrieve_asset_copy([ $copy_id, {flesh => 1, flesh_fields => {'acp' => ['call_number']}}]) -- 2.11.0