From 0c5fc3cf6d46d6422c9be89af67e8f53f61448a8 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 (cherry picked from commit a94026741c771df0ecb1f36bdba0d24c2e43f6f9) Signed-off-by: Matt Blenkinsop --- 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