Forward port of import log false error fixes.

This commit is contained in:
Colin Kuskie 2007-06-29 23:08:26 +00:00
parent c6577851d0
commit 8bd9f14a3f
3 changed files with 80 additions and 9 deletions

View file

@ -131,8 +131,10 @@ sub importAssetData {
my $id = $data->{properties}{assetId};
my $class = $data->{properties}{className};
my $version = $data->{properties}{revisionDate};
my $asset = WebGUI::Asset->new($self->session, $id, $class, $version);
if (defined $asset) { # update an existing revision
my $asset;
my $assetExists = WebGUI::Asset->assetExists($self->session, $id, $class, $version);
if ($assetExists) { # update an existing revision
$asset = WebGUI::Asset->new($self->session, $id, $class, $version);
$error->info("Updating an existing revision of asset $id");
$asset->update($data->{properties});
##Pending assets are assigned a new version tag