package importing fixes
This commit is contained in:
parent
93b5ca16e4
commit
f22646625b
9 changed files with 36 additions and 46 deletions
|
|
@ -46,13 +46,15 @@ Override the default method in order to deal with attachments.
|
|||
sub addRevision {
|
||||
my $self = shift;
|
||||
my $newSelf = $self->SUPER::addRevision(@_);
|
||||
foreach my $field (qw(image1 image2 image3 brochure manual warranty)) {
|
||||
if ($self->get($field)) {
|
||||
my $newStorage = WebGUI::Storage->get($self->session,$self->get($field))->copy;
|
||||
$newSelf->update({$field=>$newStorage->getId});
|
||||
}
|
||||
}
|
||||
return $newSelf;
|
||||
if ($newSelf->getRevisionCount > 1) {
|
||||
foreach my $field (qw(image1 image2 image3 brochure manual warranty)) {
|
||||
if ($self->get($field)) {
|
||||
my $newStorage = WebGUI::Storage->get($self->session,$self->get($field))->copy;
|
||||
$newSelf->update({$field=>$newStorage->getId});
|
||||
}
|
||||
}
|
||||
}
|
||||
return $newSelf;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue