From: miker Date: Fri, 1 Aug 2008 18:57:44 +0000 (+0000) Subject: ingest of dates thinko X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=35aa963b0121fb22ec400937bdc508ec44c1ff8f;p=Evergreen.git ingest of dates thinko git-svn-id: svn://svn.open-ils.org/ILS/trunk@10237 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm b/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm index 9cf011ecea..daee2c92c2 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Ingest.pm @@ -1088,12 +1088,16 @@ sub biblio_descriptor { 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;