Don't call setParent if the asset is still broken. Alert user if the asset is still broken. Fixes bug #11957.
This commit is contained in:
parent
270f52aaaa
commit
8c4785b165
2 changed files with 6 additions and 2 deletions
|
|
@ -8,6 +8,7 @@
|
|||
- fixed #11965: FriendManager pagination and getUsersNotIn
|
||||
- fixed #11964: files show in trash and in old revisions
|
||||
- fixed #11954: Can't clear packed head tags
|
||||
- fixed #11957: finBrokenAsset --fix does not fix per se
|
||||
|
||||
7.10.4
|
||||
- Added WebGUI::Fork api
|
||||
|
|
|
|||
|
|
@ -103,12 +103,15 @@ while ( my %row = $sth->hash ) {
|
|||
}
|
||||
print "Fixed.\n";
|
||||
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $row{assetId} );
|
||||
# Make sure we have a valid parent
|
||||
unless ( WebGUI::Asset->newByDynamicClass( $session, $row{parentId} ) ) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $row{assetId} );
|
||||
unless ( $asset && WebGUI::Asset->newByDynamicClass( $session, $row{parentId} ) ) {
|
||||
$asset->setParent( WebGUI::Asset->getImportNode( $session ) );
|
||||
print "\tNOTE: Invalid parent. Asset moved to Import Node\n";
|
||||
}
|
||||
if (!$asset) {
|
||||
print "\tWARNING. Asset is still broken.\n";
|
||||
}
|
||||
|
||||
} ## end if ($fix)
|
||||
elsif ($delete) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue