fix package double import problem
This commit is contained in:
parent
b806163b1e
commit
3625526909
2 changed files with 12 additions and 2 deletions
|
|
@ -4,6 +4,7 @@
|
|||
- rfe: Asset->get should return a copy of the properties hashref
|
||||
- Fixed a typo in testEnvironment.pl version number for DBD::mysql
|
||||
- Fixed a Recurring Payments processing bug: illegal division by zero
|
||||
- fix: How to hose your assets (perlDreamer Consulting, LLC)
|
||||
|
||||
|
||||
7.3.8
|
||||
|
|
|
|||
|
|
@ -135,12 +135,21 @@ sub importAssetData {
|
|||
if (defined $asset) { # update an existing revision
|
||||
$error->info("Updating an existing revision of asset $id");
|
||||
$asset->update($data->{properties});
|
||||
} else {
|
||||
##Pending assets are assigned a new version tag
|
||||
if ($data->{properties}->{status} eq 'pending') {
|
||||
$self->session->db->write(
|
||||
'update assetData set tagId=? where assetId=? and revisionDate='.$data->{properties}->{revisionDate},
|
||||
[WebGUI::VersionTag->getWorking($self->session)->getId, $data->{properties}->{assetId}]
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$asset = WebGUI::Asset->new($self->session, $id, $class);
|
||||
if (defined $asset) { # create a new revision of an existing asset
|
||||
$error->info("Creating a new revision of asset $id");
|
||||
$asset = $asset->addRevision($data->{properties}, $version);
|
||||
} else { # add an entirely new asset
|
||||
}
|
||||
else { # add an entirely new asset
|
||||
$error->info("Adding $id that didn't previously exist.");
|
||||
$asset = $self->addChild($data->{properties}, $id, $version);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue