[Koha-bugs] [Bug 25296] Add a way to force an empty Koha::Objects resultset
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Apr 28 07:28:06 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25296
--- Comment #4 from Frédéric Demians <frederic at tamil.fr> ---
Coming back from bug 25297, I have a question: Is it necessary to explicitly
call:
Koha::Objects->new->empty;
When you assign a result:
my $result = Koha::Holds->new;
Don't you have already $result->count == 0 ?
If this was the case, your code in bug 25297 could become something like that:
my $result = Koha::Holds->new;
my $biblio = $self->biblio;
return $result unless $biblio;
my $items_rs = $self->_result->aqorders_items;
my @item_numbers = $items_rs->get_column('itemnumber')->all;
return $result unless @item_numbers;
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list