LP#1755502 Fix hold user test collab/dbwells/lp1755502_fix_hold_user_test
authorDan Wells <dbw2@calvin.edu>
Thu, 22 Mar 2018 14:31:58 +0000 (10:31 -0400)
committerDan Wells <dbw2@calvin.edu>
Thu, 22 Mar 2018 14:31:58 +0000 (10:31 -0400)
Now that we are fleshing this field, we need to dig a little deeper
for the 'id' to test if we are the same user.

Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 3f3d946..c2d5518 100644 (file)
@@ -1126,7 +1126,7 @@ sub check_captured_holds {
         ]
     )->[0];
 
-    if ($hold and $hold->usr == $patron->id) {
+    if ($hold and $hold->usr->id == $patron->id) {
         $self->checkout_is_for_hold(1);
         return undef;
     } elsif ($hold) {