From 59d12c5c05a915c8d81b200081b6e39a23b25996 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Thu, 1 Dec 2011 15:22:55 -0800 Subject: [PATCH] Allow it to return permission denied errors. Consider making this return an error object or exception later. --- lib/WebGUI/Asset.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 5a1e163a1..c2e7967e0 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -2812,6 +2812,9 @@ sub www_add { my $template = eval { $newAsset->getEditTemplate }; return $@ if $@; + if (! blessed $template ) { + return $template; + } if ( $template->getForm("form") ) { $template->getForm("form")->action( $self->getUrl ); $template->getForm("form")->addField( "Hidden", name => "func", value => "addSave" );