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>
(cherry picked from commit ba80c71e63
)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
955d3a53e7
commit
35d1f81277
1 changed files with 2 additions and 0 deletions
|
@ -93,6 +93,8 @@ sub api_query_fixer {
|
|||
} else {
|
||||
$query =~
|
||||
s/${quotes}(age_restriction|cn_class|cn_item|cn_sort|cn_source|cn_suffix|collection_issn|collection_title|collection_volume|ean|edition_statement|illustrations|isbn|issn|item_type|lc_control_number|notes|number|pages|publication_place|publication_year|publisher|material_size|serial_total_issues|url|volume|volume_date|volume_description)${quotes}/${quotes}biblioitem\.$1${quotes}/g;
|
||||
$query =~ # handle ambiguous 'biblionumber'
|
||||
s/${quotes}(biblio_id)${quotes}/${quotes}me\.$1${quotes}/g;
|
||||
}
|
||||
|
||||
return $query;
|
||||
|
|
Loading…
Reference in a new issue