From c71db8e4ec8f1fa0ca13db48f7ccc5b0493b946d Mon Sep 17 00:00:00 2001 From: Adrien Saurat Date: Tue, 19 Mar 2013 13:51:37 +0100 Subject: [PATCH] Bug 9842: SIP tests, fix for 07hold.t on Cancel Hold Fixes tests resulting in a "No such hold on patron record" error when it was not true. --- C4/SIP/ILS.pm | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/SIP/ILS.pm b/C4/SIP/ILS.pm index 5d59850..cbe988b 100644 --- a/C4/SIP/ILS.pm +++ b/C4/SIP/ILS.pm @@ -302,14 +302,14 @@ sub cancel_hold { $trans->patron($patron); $trans->item($item); $trans->drop_hold; - unless ($trans->ok) { + unless ($trans->ok(1)) { $trans->screen_msg("Error with transaction drop_hold: " . $trans->screen_msg); return $trans; } # Remove the hold from the patron's record first $trans->ok($patron->drop_hold($item_id)); # different than the transaction drop! - unless ($trans->ok) { + unless ($trans->ok(1)) { # We didn't find it on the patron record $trans->screen_msg("No such hold on patron record."); return $trans; -- 1.7.5.4