From a94026741c771df0ecb1f36bdba0d24c2e43f6f9 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 21 Apr 2023 11:48:55 +0000 Subject: [PATCH] Bug 33490: Fix ambiguous query error Doing actual testing with some agreements with expired periods, this was returning a 500 error Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi --- Koha/ERM/Agreements.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/ERM/Agreements.pm b/Koha/ERM/Agreements.pm index 6001c4727c..e8b23c82e5 100644 --- a/Koha/ERM/Agreements.pm +++ b/Koha/ERM/Agreements.pm @@ -70,7 +70,7 @@ sub filter_by_expired { push @expired_agreement_ids, $p->agreement_id; } - return $self->search( { agreement_id => \@expired_agreement_ids } ); + return $self->search( { "me.agreement_id" => \@expired_agreement_ids } ); } =head3 type -- 2.39.5