From 1d327692f5b3d9df230a8cc3963698982e89971b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 4 Nov 2016 13:41:09 +0100 Subject: [PATCH] DN: niemals leere Strings als ids verwenden --- SL/DN.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 9273bf564..69db0053f 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -475,11 +475,11 @@ sub set_template_options { # prepare meta information for template introspection $form->{template_meta} = { formname => $form->{formname}, - language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id}), + language => SL::DB::Manager::Language->find_by_or_create(id => $form->{language_id} || undef), format => $form->{format}, media => $form->{media}, extension => $extension, - printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id}), + printer => SL::DB::Manager::Printer->find_by_or_create(id => $form->{printer_id} || undef), today => DateTime->today, }; -- 2.20.1