Fix how update and addRevision handle defaults from the definition subroutine
when it returns an array ref.
This commit is contained in:
parent
c7fcd40a25
commit
c6e9d322a8
4 changed files with 10 additions and 1 deletions
|
|
@ -126,6 +126,9 @@ sub addRevision {
|
|||
# get the default values of each property
|
||||
foreach my $property (keys %{$definition->{properties}}) {
|
||||
$defaults{$property} = $definition->{properties}{$property}{defaultValue};
|
||||
if (ref($defaults{$property}) eq 'ARRAY') {
|
||||
$defaults{$property} = $defaults{$property}->[0];
|
||||
}
|
||||
}
|
||||
|
||||
# prime the tables
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue