X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FBase.pm;h=3375dfd26fba523b126e784c93e32a9779b8cfb6;hb=05b8c530848b1b7bada1e39ceb8325eb688c35d0;hp=6fc70e6a4d6bc64377ce5c41627cf183b445103a;hpb=b6e2413ee413ce21b28429c05bbcc3f516a0754a;p=maypole.git diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index 6fc70e6..3375dfd 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -15,7 +15,8 @@ sub process { return if $r->{template}; # Authentication has set this, we're done. $r->{template} = $method; - $r->objects([ $class->fetch_objects($r) ]); + my $obj = $class->fetch_objects($r); + $r->objects([$obj]) if $obj; $class->$method( $r, $obj, @{ $r->{args} } ); }