@@ -, +, @@ --- Koha/CmsPages.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- a/Koha/CmsPages.pm +++ a/Koha/CmsPages.pm @@ -59,14 +59,14 @@ sub add { carp( 'Koha::CmsPages::add() undefined parameter: input' ) unless defined $input; my $data = { - parent => $input->{parent}, - location => $input->{location}, - branchcode => $input->{branchcode}, + parent => $input->{parent} eq '' ? undef : $input->{parent}, + location => $input->{location} eq '' ? undef : $input->{location}, + branchcode => $input->{branchcode} eq '' ? undef : $input->{branchcode}, lang => $input->{lang}, sortorder => $input->{sortorder}, title => $input->{title}, title_link => $input->{title_link}, - publish => $input->{publish}, + publish => $input->{publish} eq 'on' ? 1 : 0, content => $input->{content} }; --