Make the Product Sku copy the storage locations when a new revision is added.

This commit is contained in:
Colin Kuskie 2009-07-16 04:12:30 +00:00
parent 1c40934876
commit e335276cfa
3 changed files with 14 additions and 2 deletions

View file

@ -47,7 +47,7 @@ sub addRevision {
my $newSelf = $self->SUPER::addRevision(@_);
if ($newSelf->getRevisionCount > 1) {
foreach my $field (qw(image1 image2 image3 brochure manual warranty)) {
if ($self->get($field) && $self->get($field) ne $newSelf->get($field)) {
if ($self->get($field)) {
my $newStorage = WebGUI::Storage->get($self->session,$self->get($field))->copy;
$newSelf->update({$field=>$newStorage->getId});
}