From aa14e3e2d19712bb8e06adacdb59a008088335b6 Mon Sep 17 00:00:00 2001 From: joshferraro Date: Fri, 30 Sep 2005 18:58:25 +0000 Subject: [PATCH] Previously there was no check to make sure that an issn number actually existed; so if there was no isbn, and the issn was blank, the item would be assigned a random biblionumber and the breeding farm would report that the item already exists in the catalog (even though it didn't). This fix adds a check to determine whether the imported record has an issn before assigning a matching biblionumber. --- C4/Breeding.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Breeding.pm b/C4/Breeding.pm index 1583fda21f..030da534f3 100644 --- a/C4/Breeding.pm +++ b/C4/Breeding.pm @@ -91,8 +91,10 @@ where isbn=? and title=?"); $searchisbn->execute($oldbiblio->{isbn}); ($biblioitemnumber) = $searchisbn->fetchrow; } else { - $searchissn->execute($oldbiblio->{issn}); - ($biblioitemnumber) = $searchissn->fetchrow; + if ($oldbiblio->{issn}) { + $searchissn->execute($oldbiblio->{issn}); + ($biblioitemnumber) = $searchissn->fetchrow; + } } if ($biblioitemnumber) { $alreadyindb++; -- 2.20.1