Cleanse the stop_fines_time argument in AssetCommon->set_item_lost_or_lod.
authorJason Stephenson <jstephenson@mvlc.org>
Mon, 9 Sep 2013 17:16:34 +0000 (13:16 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Mon, 9 Sep 2013 17:16:34 +0000 (13:16 -0400)
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 <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/AssetCommon.pm

index d0b7167..289c4cf 100644 (file)
@@ -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']}}])