[open-ils-commits] r18839 - branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 23 16:39:15 EST 2010


Author: senator
Date: 2010-11-23 16:39:09 -0500 (Tue, 23 Nov 2010)
New Revision: 18839

Modified:
   branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
Log:
Backport r18838 from trunk

Serials: Fix error in batch receiving when trying to change the shelving
location of the previous item in the stream when there /is/ no previous
item in the stream



Modified: branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm
===================================================================
--- branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm	2010-11-23 21:38:28 UTC (rev 18838)
+++ branches/rel_2_0/Open-ILS/src/perlmods/OpenILS/Application/Serial.pm	2010-11-23 21:39:09 UTC (rev 18839)
@@ -1258,6 +1258,7 @@
             }
         }
     }) or return $e->die_event;
+    return 0 if not @$unit;
 
     $e->retrieve_serial_unit($unit->[0]->{"id"}) or $e->die_event;
 }
@@ -1267,6 +1268,7 @@
 
     my $prev_unit = _unit_by_iss_and_str($e,$prev_iss,$curr_item->stream);
     return $prev_unit if defined $U->event_code($prev_unit);
+    return 0 if not $prev_unit;
 
     if ($prev_unit->location != $new_loc) {
         $prev_unit->location($new_loc);



More information about the open-ils-commits mailing list