[Koha-bugs] [Bug 27002] Make Koha::Biblio->pickup_locations return a Koha::Libraries resultset

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Nov 13 17:11:10 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27002

--- Comment #5 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
Created attachment 113612
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113612&action=edit
Bug 27002: (follow-up) Fix empty Koha::Item->pickup_locations

In Koha::Item pickup_locations we were using the Koha::Objects->empty to
return an effectively empty Koha::Libraries object. However, this only
sets the result cache to an empty arrayref and as such only affect
iterators and not subsequent chained queries (like the get_column I call
to get back a DBIx::Class:ResultSetColumn in this patchset). As such,
this patch updates the Koha::Item->pickup_locations method to use an
always empty search ->search(\'0 = 1') to fulfil the same purpose as the
prior call to empty and return an empty set that is available for both
iterating and query chaining.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list