From be2deffb09ab0044aef2beb2d13e93fe6a16d621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joonas=20Kylm=C3=A4l=C3=A4?= Date: Wed, 14 Apr 2021 15:41:08 +0300 Subject: [PATCH] Bug 20447: Return valid koha field values The legal values for holdings.suppress koha field are 0 and 1. This makes sure that illegal values cannot be returned. --- Koha/Holding.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Koha/Holding.pm b/Koha/Holding.pm index b80a515607..2abfc6cf28 100644 --- a/Koha/Holding.pm +++ b/Koha/Holding.pm @@ -329,6 +329,10 @@ sub marc_to_koha_fields { } $result->{$column} = scalar(@values) ? join(' | ', @values) : undef; } + + # convert suppress field to boolean + $result->{'suppress'} = $result->{'suppress'} ? 1 : 0; + return $result; } -- 2.11.0