From 14a04dd4a579654beb8660da35ec939aaa08c7fb Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 5 Jul 2024 12:03:58 +0000 Subject: [PATCH] Bug 37261: Fix returning additional fields of unmapped tablename Signed-off-by: David Nind Signed-off-by: Tomas Cohen Arazi Signed-off-by: Katrin Fischer --- Koha/AdditionalField.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/AdditionalField.pm b/Koha/AdditionalField.pm index e3b675bc62..25d6808c16 100644 --- a/Koha/AdditionalField.pm +++ b/Koha/AdditionalField.pm @@ -62,7 +62,7 @@ sub to_api { my $json = $self->SUPER::to_api($params); - $json->{resource_type} = $table_to_resource->{ $self->tablename }; + $json->{resource_type} = $table_to_resource->{ $self->tablename } || $self->tablename; return $json; } -- 2.39.5