From: Sven Schöling Date: Fri, 4 Nov 2016 12:41:09 +0000 (+0100) Subject: DN: niemals leere Strings als ids verwenden X-Git-Tag: release-3.5.4~1935 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1d327692f5b3d9df230a8cc3963698982e89971b;p=kivitendo-erp.git DN: niemals leere Strings als ids verwenden --- 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, };