[Koha-patches] [PATCH] bug 2423: actually ignore already-imported records

Galen Charlton galen.charlton at liblime.com
Thu Jul 31 01:08:02 CEST 2008


When recommiting a partially completed MARC
record batch, records that were already imported
(or had an error status) were being processed
again, leading to duplicate bibs.  Corrected
so that these records are actually ignored.
---
 C4/ImportBatch.pm |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/C4/ImportBatch.pm b/C4/ImportBatch.pm
index 9f9c7f6..f490fb7 100644
--- a/C4/ImportBatch.pm
+++ b/C4/ImportBatch.pm
@@ -469,6 +469,7 @@ sub BatchCommitBibRecords {
         }
         if ($rowref->{'status'} eq 'error' or $rowref->{'status'} eq 'imported') {
             $num_ignored++;
+            next;
         }
 
         my $marc_record = MARC::Record->new_from_usmarc($rowref->{'marc'});
@@ -627,6 +628,7 @@ sub BatchRevertBibRecords {
     while (my $rowref = $sth->fetchrow_hashref) {
         if ($rowref->{'status'} eq 'error' or $rowref->{'status'} eq 'reverted') {
             $num_ignored++;
+            next;
         }
 
         my $bib_result = _get_revert_action($overlay_action, $rowref->{'overlay_status'}, $rowref->{'status'});
-- 
1.5.5.GIT




More information about the Koha-patches mailing list