https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27071 --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 117145 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117145&action=edit Bug 27071: (follow-up) Get rid of loop This patch gets rid of a loop on the librarary's groups siblings, and acknowledges ->get_hold_libraries returns a proper Koha::Libraries iterator that can be chained with a new query on the passed branchcode. This way we only fetch a count from the DB and no loop needs to take place on the code. To test: 1. Apply this patch 2. Run: $ kshell k$ prove t/db_dependent/Koha/Libraries.t => SUCCESS: Tests pass! 3. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.