Bug 26270: Fix ThingISBN after a change in behaviour
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 21 Aug 2020 12:00:51 +0000 (14:00 +0200)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 24 Aug 2020 08:12:47 +0000 (10:12 +0200)
This is just a guess! One of our tests is failing since today and we
don't modify anything in this area.
My guess is that the service is now returning the normalized version of
the ISBN

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

C4/XISBN.pm

index c28cc34..de9dc10 100644 (file)
@@ -106,6 +106,8 @@ sub get_xisbns {
         next if $unique_xisbns->{ $response_data->{content} };
         $unique_xisbns->{ $response_data->{content} }++;
         my $xbiblio= _get_biblio_from_xisbn($response_data->{content});
+        next unless $xbiblio;
+        next if $xbiblio->{normalized_isbn} && $xbiblio->{normalized_isbn} eq $isbn;
         push @xisbns, $xbiblio if $xbiblio && $xbiblio->{biblionumber} ne $biblionumber;
     }
     if ( wantarray ) {