https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25996 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #165281|0 |1 is obsolete| | --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 166056 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=166056&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 <michaela.sieber@kit.edu> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.