https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996
ByWater Sandboxes <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165244|0 |1 is obsolete| | --- Comment #13 from ByWater Sandboxes <[email protected]> --- Created attachment 165281 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=165281&action=edit Bug 25996: Make AddDebarment() use Koha::Patron::Restriction This patch makes the AddDebarment() method use the Koha::Object-based class to ease the next steps. The current codebase makes the feature fragile otherwise, as adding a new row and then querying for the latest row of that kind seems risky, With this approach the result is the same, but we have the Koha::Patron::Restriction object for using it later in logging. I opted to return 1 as it does now. The whole module deserves to be removed in the future but it is out of the scope of this report. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/Patron/Borrower_Debarments.t => SUCCESS: Tests pass 2. Apply this tiny refactoring patch 3. Repeat 1 => SUCCESS: Tests still pass! 4. Sign off :-D Sponsored-by: Karlsruhe Institute of Technology (KIT) Signed-off-by: Michaela Sieber <[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/
