X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b04c9926825b62f740ee2027978b1c18cfc581d0..321730c8b122eec74794faa919875a32338458e7:/SL/DB/Object.pm diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 52b9300a9..5e58ed958 100644 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -61,9 +61,10 @@ sub _assign_attributes { while (my ($attribute, $value) = each %attributes) { my $type = lc($types{$attribute} || 'text'); - $value = $type eq 'boolean' ? ($value ? 't' : 'f') - : $text_column_types{$type} ? $value - : ($value || undef); + $value = $type eq 'boolean' ? ($value ? 't' : 'f') + : $text_column_types{$type} ? $value + : defined($value) && ($value eq '') ? undef + : $value; $self->$attribute($value); }