]> git.koha-community.org Git - koha.git/commit
Bug 24554: Only embed relations from Koha::Biblio in to_api
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 31 Jan 2020 12:06:51 +0000 (09:06 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 6 Feb 2020 12:37:25 +0000 (12:37 +0000)
commitd5e993ed47400206519bfe74df79e9254f1175fe
treeabc7c0811889243cbd1c8e98625411d00ab665d0
parentbc94d7e659b1f2cba90633cdb9f725e02db049f3
Bug 24554: Only embed relations from Koha::Biblio in to_api

This patch simplifies the behaviour of Koha::Biblio->to_api. It was
designed with the idea of handling possible methods that would be added
to Koha::Biblioitem. But it had a weird fallback behaviour was
highlighted by using it with bug 24528.

On fixing it it become obvious that it was unnessessarily complex and
that it was not worth. That's the reason there wasn't any test for it,
as Koha::Biblioitem doesn't implement any extra methods.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Biblio.t
=> SUCCESS: Tests pass
2. Apply this patch
3. Repeat (1)
=> SUCCESS: Tests pass!
4. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Biblio.pm