Fixed a bug where posts would error because they didn't point to the thread
This commit is contained in:
parent
501c686872
commit
dde2b149b5
1 changed files with 9 additions and 2 deletions
|
|
@ -196,8 +196,15 @@ sub www_view {
|
|||
my @contribs = ();
|
||||
foreach my $row ( @{$p->getPageData} ) {
|
||||
my $assetId = $row->{assetId};
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
push(@contribs,$asset->get);
|
||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||
my $props = $asset->get;
|
||||
if (ref $asset eq "WebGUI::Asset::Post") {
|
||||
$asset = $asset->getThread;
|
||||
$props = $asset->get;
|
||||
$props->{className} = "WebGUI::Asset::Post";
|
||||
}
|
||||
|
||||
push(@contribs,$props);
|
||||
}
|
||||
my $contribsCount = $p->getRowCount;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue