Bug 37262: Fix for unmapped tablename filtering
Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Edit: amended to tidy the new code (tcohen) Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
263cd36541
commit
2fb123d2db
|
|
@ -53,9 +53,13 @@ sub list {
|
|||
|
||||
return try {
|
||||
my $additional_fields_set = Koha::AdditionalFields->new;
|
||||
if ($resource_type) {
|
||||
if ( $resource_type && $resource_to_table->{$resource_type} ) {
|
||||
$additional_fields_set =
|
||||
$additional_fields_set->search( { tablename => $resource_to_table->{$resource_type} } );
|
||||
} elsif ($resource_type) {
|
||||
$additional_fields_set = $additional_fields_set->search( { tablename => $resource_type } );
|
||||
} else {
|
||||
$additional_fields_set = $additional_fields_set->search();
|
||||
}
|
||||
|
||||
return $c->render(
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@
|
|||
- basket
|
||||
- invoice
|
||||
- order
|
||||
- subscription
|
||||
- accountlines:credit
|
||||
- accountlines:debit
|
||||
- $ref: "../swagger.yaml#/parameters/match"
|
||||
- $ref: "../swagger.yaml#/parameters/order_by"
|
||||
- $ref: "../swagger.yaml#/parameters/page"
|
||||
|
|
|
|||
Loading…
Reference in New Issue