Fixes #10660 Crud doesn't like 0
This commit is contained in:
parent
ca7a93452a
commit
f9c917e426
3 changed files with 71 additions and 1 deletions
|
|
@ -169,7 +169,10 @@ sub create {
|
|||
# add defaults
|
||||
my $properties = $class->crud_getProperties($session);
|
||||
foreach my $property (keys %{$properties}) {
|
||||
$data->{$property} ||= $properties->{$property}{defaultValue};
|
||||
# set a default value if it's empty or undef (as per L<update>)
|
||||
if ($data->{$property} eq "") {
|
||||
$data->{$property} = $properties->{$property}{defaultValue};
|
||||
}
|
||||
}
|
||||
|
||||
# determine sequence
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue