[open-ils-commits] r10237 - trunk/Open-ILS/src/perlmods/OpenILS/Application

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Aug 1 14:57:52 EDT 2008


Author: miker
Date: 2008-08-01 14:57:44 -0400 (Fri, 01 Aug 2008)
New Revision: 10237

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
Log:
ingest of dates thinko

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2008-08-01 18:00:30 UTC (rev 10236)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm	2008-08-01 18:57:44 UTC (rev 10237)
@@ -1088,12 +1088,16 @@
 	my $res = $rd_script->run || ($log->error( "Descriptor script died!  $@" ) && return undef);
 	$log->debug("Script for biblio descriptor extraction completed successfully");
 
-    if ($res->{date1} ne '    ') {
-        $res->{date1} =~ tr/ux/00/;
+    my $d1 = $res->date1;
+    if ($d1 && $d1 ne '    ') {
+        $d1 =~ tr/ux/00/;
+        $res->date1( $d1 );
     }
 
-    if ($res->{date2} ne '    ') {
-        $res->{date2} =~ tr/ux/99/;
+    my $d2 = $res->date2;
+    if ($d2 && $d2 ne '    ') {
+        $d2 =~ tr/ux/99/;
+        $res->date2( $d2 );
     }
 
 	return $res;



More information about the open-ils-commits mailing list