Fixed an unhandled exception in Workflow/Activity/PurgeOldAssetRevisions.pm
This commit is contained in:
parent
025a66e30d
commit
e8afd2ad72
2 changed files with 8 additions and 3 deletions
|
|
@ -6,6 +6,7 @@
|
|||
they complete their transaction.
|
||||
- fix: Trouble with Search Users (perlDreamer Consulting, LLC)
|
||||
http://www.plainblack.com/bugs/tracker/trouble-with-search-users
|
||||
- fix: Fixed an unhandled exception in Workflow/Activity/PurgeOldAssetRevisions.pm
|
||||
|
||||
|
||||
7.3.14
|
||||
|
|
|
|||
|
|
@ -79,9 +79,13 @@ sub execute {
|
|||
my $sth = $self->session->db->read("select assetData.assetId,asset.className,assetData.revisionDate from asset left join assetData on asset.assetId=assetData.assetId where assetData.revisionDate<? order by assetData.revisionDate asc", [time() - $self->get("purgeAfter")]);
|
||||
while (my ($id, $class, $version) = $sth->array) {
|
||||
my $asset = WebGUI::Asset->new($self->session, $id,$class,$version);
|
||||
if ($asset->getRevisionCount("approved") > 1) {
|
||||
$asset->purgeRevision;
|
||||
}
|
||||
if (defined $asset) {
|
||||
if ($asset->getRevisionCount("approved") > 1) {
|
||||
$asset->purgeRevision;
|
||||
}
|
||||
} else {
|
||||
$self->session->errorHandler->error("Could not instanciate asset $id $class $version perhaps it is corrupt.")
|
||||
}
|
||||
}
|
||||
$sth->finish;
|
||||
return $self->COMPLETE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue