From: Moritz Bunkus Date: Thu, 9 Dec 2010 16:03:59 +0000 (+0100) Subject: Leeren String in undef für anständige DB-Abfrage umwandeln X-Git-Tag: release-2.6.3~25^2~56 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=b354d72972e377a3007f8f03ad9b719488c4b3bf;p=kivitendo-erp.git Leeren String in undef für anständige DB-Abfrage umwandeln --- diff --git a/SL/DB/Helper/TranslatedAttributes.pm b/SL/DB/Helper/TranslatedAttributes.pm index dbb3ae167..2c3857c7a 100644 --- a/SL/DB/Helper/TranslatedAttributes.pm +++ b/SL/DB/Helper/TranslatedAttributes.pm @@ -38,7 +38,7 @@ sub _check { croak "Invalid attribute '${attribute}'" unless $self->can($attribute); croak "Object has not been saved yet" unless $self->id || $verbatim; - return ref($language_id) eq 'SL::DB::Language' ? $language_id->id : $language_id; + return (ref($language_id) eq 'SL::DB::Language' ? $language_id->id : $language_id) || undef; } sub _find_translation {