Refactor out the JSON collateral code from FilePump/Bundle.pm to make an aspect

that can be used by assets, operations and any other modules in WebGUI.
This commit is contained in:
Colin Kuskie 2009-08-26 15:42:18 +00:00
parent 7fcb339605
commit 18a52b9aa2
6 changed files with 718 additions and 2 deletions

View file

@ -126,7 +126,7 @@ 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') {
if (ref($defaults{$property}) eq 'ARRAY' && !$definition->{properties}{$property}{serialize}) {
$defaults{$property} = $defaults{$property}->[0];
}
}