From 7817d805331d66da66bb7321fb8fe64e139daf29 Mon Sep 17 00:00:00 2001 From: Lari Taskula Date: Fri, 16 Jun 2017 18:34:12 +0300 Subject: [PATCH] Bug 14698: (follow-up) Koha::AtomicUpdater->find allow hashref as param Otherwise t/db_dependent/TestBuilder.t fails! To test: 1. prove t/db_dependent/Koha/AtomicUpdater.t 2. prove t/db_dependent/TestBuilder.t --- Koha/AtomicUpdater.pm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Koha/AtomicUpdater.pm b/Koha/AtomicUpdater.pm index b33a00c..917c08a 100644 --- a/Koha/AtomicUpdater.pm +++ b/Koha/AtomicUpdater.pm @@ -53,8 +53,7 @@ sub _get_castable_unique_columns { @PARAM1 Scalar, issue_id or atomicupdate_id @RETURNS Koha::AtomicUpdate -@THROWS Koha::Exception::BadParameter, if @PARAM1 is not a scalar - Koha::Exception::DuplicateObject, if @PARAM1 matches both the issue_id and atomicupdate_id, +@THROWS Koha::Exception::DuplicateObject, if @PARAM1 matches both the issue_id and atomicupdate_id, you should change your issue naming convention. =cut @@ -62,9 +61,7 @@ sub find { my ( $self, $id ) = @_; return unless $id; if (ref($id)) { - my @cc1 = caller(1); - my @cc0 = caller(0); - Koha::Exception::BadParameter->throw(error => $cc1[3]."() -> ".$cc0[3]."():> Given \$id '$id' is not a scalar."); + return $self->SUPER::find($id); } my @results = $self->_resultset()->search({'-or' => [ -- 2.7.4