fix for ModZebra() trying to delete an existing bib - that doesnt exist, during an...
authorMason James <mtj@liblime.com>
Thu, 6 Dec 2007 06:49:50 +0000 (00:49 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Thu, 6 Dec 2007 17:34:32 +0000 (11:34 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
C4/Biblio.pm

index 83ddd6d..966343d 100755 (executable)
@@ -3084,8 +3084,10 @@ sub ModZebra {
         }
         if ($op eq 'specialUpdate') {
             # OK, we have to add or update the record
-            # 1st delete (virtually, in indexes) ...
-            %result = _DelBiblioNoZebra($biblionumber,$record,$server);
+            # 1st delete (virtually, in indexes), if record actually exists
+            if ($record) { 
+                %result = _DelBiblioNoZebra($biblionumber,$record,$server);
+            }
             # ... add the record
             %result=_AddBiblioNoZebra($biblionumber,$newRecord, $server, %result);
         } else {