X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FObject.pm;h=1c7c050ea2d54924138c0f1b508fde76c62b0a35;hb=6395006f1bb009faaf6762f9d21949bbc2f6a0ff;hp=3cf670d55c31d7a29b010082d918c5747af1e748;hpb=3c6e133b2e272859f39c7541c8b10eb567831989;p=kivitendo-erp.git diff --git a/SL/DB/Object.pm b/SL/DB/Object.pm index 3cf670d55..1c7c050ea 100755 --- a/SL/DB/Object.pm +++ b/SL/DB/Object.pm @@ -60,9 +60,10 @@ sub _assign_attributes { my %types = map { $_->name => $_->type } ref($self)->meta->columns; - # Special case for *_as_man_days/*_as_man_days_unit: the _unit - # variation must always be called after the non-unit method. - my @man_days_attributes = grep { m/_as_man_days$/ } keys %attributes; + # Special case for *_as_man_days / *_as_man_days_string / + # *_as_man_days_unit: the _unit variation must always be called + # after the non-unit methods. + my @man_days_attributes = grep { m/_as_man_days(?:_string)?$/ } keys %attributes; foreach my $attribute (@man_days_attributes) { my $value = delete $attributes{$attribute}; $self->$attribute(defined($value) && ($value eq '') ? undef : $value);