https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32528
Jonathan Druart <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144847|0 |1 is obsolete| | Attachment #144925|0 |1 is obsolete| | --- Comment #10 from Jonathan Druart <[email protected]> --- Created attachment 144938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144938&action=edit Bug 32528: Make safe_to_delete exit earlier on error conditions This patch makes the `Koha::Item->safe_to_delete` method return right after one of the checked conditions is met. This way we avoid further DB queries and processing. No behavior change is expected To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Item.t => SUCCESS: Tests pass! 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests STILL pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <[email protected]> Signed-off-by: Nick Clemens <[email protected]> Bug 32528: Change return logic Back to 1 return statement Prevent the Koha::Result::Boolean instanciation duplication Signed-off-by: Jonathan Druart <[email protected]> -- 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/
