fixed a bug when a matrix listing didn't have a forum attached
This commit is contained in:
parent
332ace9648
commit
6701a10491
1 changed files with 2 additions and 0 deletions
|
|
@ -354,6 +354,7 @@ sub upgradeMatrix {
|
|||
# migrate comments
|
||||
if($listing->{forumId}){
|
||||
my $forum = WebGUI::Asset::Wobject::Collaboration->new($session, $listing->{forumId});
|
||||
if ( defined $forum ) {
|
||||
my @comments = @{ $forum->getLineage(['descendants'], {
|
||||
includeOnlyClasses => ["WebGUI::Asset::Post", "WebGUI::Asset::Post::Thread"],
|
||||
returnObjects => 1,
|
||||
|
|
@ -367,6 +368,7 @@ sub upgradeMatrix {
|
|||
$newMatrixListing->addComment($content,0,$ownerUser);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->write("drop table Matrix_listing");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue