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

--- Comment #2 from Tomás Cohen Arazi <[email protected]> ---
Created attachment 123877
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=123877&action=edit
Bug 28871: Make Koha::Objects->empty work on list context

This patch makes Koha::Objects->empty work on list context, by making it
return the $self->search call.

To test:
1. Apply the regression test patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Objects.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Note: this patch has the side effect of making Koha::Objects->new->empty
to perform a search on the DB. I'm not sure how to solve this because
the cache needs to be set after the resultset is generated. It feels
like a cleaner approach (i.e. not using the set_cache method).

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to