Since assets are always created with defaults now, no need to introspect. Also, remove white space in "empty" lines.
This commit is contained in:
parent
2aefb5d316
commit
bf097ac337
1 changed files with 10 additions and 20 deletions
|
|
@ -121,16 +121,6 @@ sub addRevision {
|
||||||
$self->getId,
|
$self->getId,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
my %defaults = ();
|
|
||||||
# get the default values of each property
|
|
||||||
foreach my $property ($self->meta->get_all_properties) {
|
|
||||||
$defaults{$property} = $property->form->{defaultValue};
|
|
||||||
#if (ref($defaults{$property}) eq 'ARRAY' && !$definition->{serialize}) {
|
|
||||||
if (ref($defaults{$property}) eq 'ARRAY') {
|
|
||||||
$defaults{$property} = $defaults{$property}->[0];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# prime the tables
|
# prime the tables
|
||||||
foreach my $table ($self->meta->get_tables) {
|
foreach my $table ($self->meta->get_tables) {
|
||||||
unless ($table eq "assetData") {
|
unless ($table eq "assetData") {
|
||||||
|
|
@ -139,8 +129,8 @@ sub addRevision {
|
||||||
}
|
}
|
||||||
$session->db->commit;
|
$session->db->commit;
|
||||||
|
|
||||||
# merge the defaults, current values, and the user set properties
|
# current values, and the user set properties
|
||||||
my %mergedProperties = (%defaults, %{$self->get}, %{$properties}, (status => 'pending'));
|
my %mergedProperties = (%{$self->get}, %{$properties}, (status => 'pending'));
|
||||||
|
|
||||||
# Force the packed head block to be regenerated
|
# Force the packed head block to be regenerated
|
||||||
delete $mergedProperties{extraHeadTagsPacked};
|
delete $mergedProperties{extraHeadTagsPacked};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue