From: ivan Date: Mon, 28 Nov 2005 16:59:55 +0000 (+0000) Subject: allow defaults to override empty values for new objects X-Git-Tag: SQL_LEDGER_2_4_4~1^2~48 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=7e849b9ceaccba63eaeab7e724e531b7a26ff8f6;p=freeside.git allow defaults to override empty values for new objects --- diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index b58b11cfa..d5083fd79 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -51,7 +51,7 @@ sub new { $self->{'Hash'} = { map { $_ => $newhash->{$_} } qw(svcnum svcpart) }; $self->setdefault; $self->{'Hash'}{$_} = $newhash->{$_} - foreach #grep length($newhash->{$_}), + foreach grep length($newhash->{$_}), keys %$newhash; foreach my $field ( grep !defined($self->{'Hash'}{$_}), $self->fields ) {