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
|
|
@ -197,7 +197,14 @@ sub www_view {
|
||||||
foreach my $row ( @{$p->getPageData} ) {
|
foreach my $row ( @{$p->getPageData} ) {
|
||||||
my $assetId = $row->{assetId};
|
my $assetId = $row->{assetId};
|
||||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
||||||
push(@contribs,$asset->get);
|
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;
|
my $contribsCount = $p->getRowCount;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue