Bug 41695: Fix rejecter in suggestion.pm

TEST PLAN:
1 - Apply tests patch
2 - Run 'prove t/db_dependent/Koha/Suggestions.t' -> it fails on
rejecter
3 - Apply this patch
4 - Run 'prove t/db_dependent/Koha/Suggestions.t' -> it works

Note: this patch also provide tests for remaining accessors in the
subtest

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Baptiste Wojtkowski 2026-01-23 13:37:47 +00:00 committed by Lucas Gass
parent e99ad89f7c
commit 5262ff688b
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
1 changed files with 1 additions and 1 deletions

View File

@ -195,7 +195,7 @@ Returns the rejecter of the suggestion (Koha::Patron for rejectebby field)
sub rejecter {
my ($self) = @_;
my $rejecter_rs = $self->_result->managedby;
my $rejecter_rs = $self->_result->rejectedby;
return unless $rejecter_rs;
return Koha::Patron->_new_from_dbic($rejecter_rs);
}