https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36483 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #164266|0 |1 is obsolete| | --- Comment #5 from David Nind <david@davidnind.com> --- Created attachment 164293 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=164293&action=edit Bug 36483: Make API controllers use $c->objects->to_api This patch makes all controller methods using direct $object->to_api, rely on $c->objects->to_api. Direct ->to_api calling prevents things like embeds, +strings, etc to be dealt with correctly. In some cases this change reduces the code as the authors extracted the embed structure from the stash and passed it explicitly. I left out two Patrons.pm cases because I need to study it a bit more. To test: 1. Run: $ ktd --shell k$ prove t/db_dependent/api/v1 => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.