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 <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit a94026741c)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Pedro Amorim 2023-04-21 11:48:55 +00:00 committed by Matt Blenkinsop
parent 8be16d36b7
commit 0c5fc3cf6d

View file

@ -70,7 +70,7 @@ sub filter_by_expired {
push @expired_agreement_ids, $p->agreement_id; 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 =head3 type