From 6d2982560f68030ec5153d40e444575745640688 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Thu, 26 Feb 2004 15:07:24 +0000 Subject: [PATCH] Belt and braces. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@78 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole/Model/CDBI.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index c7621d2..34aa741 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -35,7 +35,7 @@ sub related { sub do_edit :Exported { my ($self, $r) = @_; my $h = CGI::Untaint->new(%{$r->{params}}); - my ($obj) = @{$r->objects}; + my ($obj) = @{$r->objects || []}; if ($obj) { # We have something to edit $obj->update_from_cgi($h); @@ -57,7 +57,7 @@ sub do_edit :Exported { sub delete :Exported { my ($self, $r) = @_; - $_->SUPER::delete for @{ $r->objects }; + $_->SUPER::delete for @{ $r->objects || [] }; $r->objects([ $self->retrieve_all ]); $r->{template} = "list"; } -- 2.39.5