Bug 20348: SIP2 patron identification fails to use userid
authorJose Martin <jose.i.martin.cuesta@gmail.com>
Wed, 7 Mar 2018 12:21:39 +0000 (15:21 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 19 Mar 2018 15:23:16 +0000 (12:23 -0300)
Replaces "or" with "||" in variable assignment

second attempt to retrieve borrower was not being executed due
to changed precedence

Signed-off-by: Colin Campbell <colin.campbell@ptfs-europe.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

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

C4/SIP/ILS/Patron.pm

index 1a90b77..6390fc0 100644 (file)
@@ -33,7 +33,7 @@ sub new {
     my $type = ref($class) || $class;
     my $self;
     $kp = Koha::Patrons->find( { cardnumber => $patron_id } )
-      or Koha::Patrons->find( { userid => $patron_id } );
+      || Koha::Patrons->find( { userid => $patron_id } );
     $debug and warn "new Patron: " . Dumper($kp->unblessed) if $kp;
     unless ($kp) {
         syslog("LOG_DEBUG", "new ILS::Patron(%s): no such patron", $patron_id);