[Koha-bugs] [Bug 32528] Koha::Item->safe_to_delete should short-circuit earlier
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Dec 27 14:07:56 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32528
Nick Clemens <nick at bywatersolutions.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #144842|0 |1
is obsolete| |
--- Comment #3 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 144847
-->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144847&action=edit
Bug 32528: Mkae 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 <tomascohen at theke.io>
Signed-off-by: Nick Clemens <nick at bywatersolutions.com>
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list