From 93e9f71a6c7d731cd7df015e6195d67425571e2f Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 23 Mar 2010 14:14:11 -0700 Subject: [PATCH] Set the correct valid parent classes for Post. --- lib/WebGUI/Asset/Post.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 74f4f25f7..ac868ef0c 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -1352,14 +1352,15 @@ sub prepareView { Make sure that the current session asset is a Thread or Post for pasting and adding checks. -This is a class method. +Technically, we really only need WebGUI::Asset::Post, but it drives some testing code crazy +so we explicitly list Thread, too. =cut sub valid_parent_classes { my $class = shift; my $session = shift; - return $session->asset->isa('WebGUI::Asset::Post'); + return [qw/WebGUI::Asset::Post::Thread WebGUI::Asset::Post/]; } #-------------------------------------------------------------------