Bug 18332: [QA Follow-up] Adjust slice call in last method

We should call slice in list context with the correct indexes.

Test plan:
Run t/db_dependent/Koha/Objects.t

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Marcel de Rooy 2017-03-31 09:32:53 +02:00 committed by Kyle M Hall
parent 712e67aa7e
commit 4bd8b751e3
1 changed files with 1 additions and 1 deletions

View File

@ -220,7 +220,7 @@ sub last {
my $count = $self->_resultset->count;
return unless $count;
my $result = $self->_resultset->slice($count - 1, $count)->first;
my ( $result ) = $self->_resultset->slice($count - 1, $count - 1);
my $object = $self->object_class()->_new_from_dbic( $result );