skip records with tag 260
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 13:11:47 +0000 (15:11 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 3 Apr 2011 13:11:47 +0000 (15:11 +0200)
koha-import.pl

index 1682e34..d347edb 100755 (executable)
@@ -94,6 +94,9 @@ while ( my $row = $sth->fetchrow_hashref ) {
        warn_dump($row, $xml);
 
        my @tag_260 = grep { $_->{tag} eq '260' } @{ $xml->{datafield} };
+
+       next unless @tag_260;
+
        warn_dump @tag_260 if $ENV{DEBUG};
 
        foreach my $sf ( @{ $tag_260[0]->{subfield} } ) {