webstaff: Serials -- allow issuances (ad hoc) that have no scap
authorMike Rylander <mrylander@gmail.com>
Mon, 22 May 2017 13:56:06 +0000 (09:56 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 30 May 2017 16:06:48 +0000 (12:06 -0400)
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Serial.pm

index 1793066..dbf2884 100644 (file)
@@ -1347,7 +1347,7 @@ sub unitize_items {
         if (!exists($found_types{$stream_id})) {
             $found_types{$stream_id} = {};
         }
-        $found_types{$stream_id}->{$scap->type} = 1;
+        $found_types{$stream_id}->{$scap->type} = 1 if ($scap);
 
         # create unit if needed
         if ($unit_id == -1 or (!$new_unit_id and $unit_id == -2)) { # create unit per item