https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27857 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #117711|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 117947 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=117947&action=edit Bug 27857: Make Koha::Patron->extended_attributes validate data This patch makes the extended_attributes method use Koha::Patron->add_extended_attribute inside the loop, instead of direct DB access. This way, it takes advantage of the validation that is done there. All happens inside a transaction, so if 'add_extended_attribute' throws an exception, everything is rolled back. To test: 1. Apply the previous patches 2. Run: $ kshell k$ prove t/db_dependent/Koha/Patron.t => FAIL: The behavior is not the correct one, tests fail 3. Apply this patch 4. Repeat 2 => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.