Bug 33974: (follow-up) biblionumber column needs special handling
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 3 Jul 2023 16:30:56 +0000 (13:30 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 3 Jul 2023 17:51:46 +0000 (14:51 -0300)
commitba80c71e63549e60fcdd5666bd2484b75e5a174d
tree4a94ee008a90fba824a9a79e510ba1b32ee7b034
parent6d433ffa8931487c967ec01c483e9bb13eb5700b
Bug 33974: (follow-up) biblionumber column needs special handling

This patch makes a particular use case be handled correctly: i.e. no
context is passed (e.g. 'biblio' explicitly) and the query is done
against the `biblio_id` attribute. This results in the following DBIC
error:

[ERROR] GET /api/v1/biblios: unhandled exception (DBIx::Class::Exception)<<DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'biblionumber' in where clause is ambiguous at /kohadevbox/koha/Koha/Objects.pm line 394>>

With this patch, this is no longuer the case :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Koha/Biblios.pm