]> git.koha-community.org Git - koha.git/commit
Bug 28002: Add extended_attributes support to POST /patrons
authorTomas Cohen Arazi <tomascohen@theke.io>
Wed, 31 Mar 2021 11:04:12 +0000 (08:04 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 22 Apr 2021 12:50:12 +0000 (14:50 +0200)
commit79087e0674258f79a3e810f0bcbcb6a0246b2bdf
tree7d108cbc4e0df7168c75f7fe3de807050ce47116
parent6d1b7ca3a05466d5b6307e112adcb94c311f668b
Bug 28002: Add extended_attributes support to POST /patrons

This patch adds support for the 'extended_attributes' parameter in the
route for adding a patron. It relies on
Koha::Patron->extended_attributes for the tests. Exceptions are catch
and the whole operation is rolled back.

I chose to handle each exception on its own if branch, with bug 28020 in
mind.

To test:
1. Apply this patchset
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/patrons.t
=> SUCCES: Tests pass!
3. Check they cover all the exception situations!
=> SUCCESS: They do!
4. Sign off :-D

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/REST/V1/Patrons.pm