From b354d72972e377a3007f8f03ad9b719488c4b3bf Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 9 Dec 2010 17:03:59 +0100 Subject: [PATCH] =?utf8?q?Leeren=20String=20in=20undef=20f=C3=BCr=20anst?= =?utf8?q?=C3=A4ndige=20DB-Abfrage=20umwandeln?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/TranslatedAttributes.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- 2.20.1