]> git.koha-community.org Git - koha.git/commit
Bug 27330: (follow-up) Cleanup missed on bug 23843
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 4 Jan 2021 14:29:38 +0000 (11:29 -0300)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Thu, 4 Mar 2021 17:26:44 +0000 (17:26 +0000)
commit5e4edb2b09a23a5b550d221dd3cf95b661e64519
tree481926a73367ba2c0c93d59f446c354e9d5e3331
parent93f8d4c7c89b03fc29d60159279408adbdcbde56
Bug 27330: (follow-up) Cleanup missed on bug 23843

This patch makes some cleanup missed on bug 23843. The catch condition
on the controller was copied and pasted from other controller and should
be avoided unless there's a known case that needs special handling.
Otherwise it will be catched by the $c->unhandled_exception call.

All the old mappings were inadvertedly kept in the controller as well as
the (unused) _to_api method.

The base class is also cleaned from unnecessary mappings. Only mapped
things need to be added.

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/api/v1/clubs_holds.t \
           t/db_dependent/Koha/Club/Hold.t
=> SUCCESS: Tests pass!
3. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit f2593558952909f6c8df5d2ed8c6fea60cf7dcb9)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit cb09491e672658bfa7d5c2b75d5faa74ba6e3418)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
Koha/Club/Hold.pm
Koha/REST/V1/Clubs/Holds.pm