From 9497b573512cd3348e5cdebb2cc07f77f3dc06b4 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Mon, 21 Jun 2004 13:30:51 +0000 Subject: [PATCH] #6617 Required cols patch in CDBI.pm (Jesse Sheidlower) git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@154 48953598-375a-da11-a14b-00016c27c3ee --- lib/Maypole/Model/CDBI.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index f27233a..825d752 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -36,9 +36,13 @@ sub do_edit :Exported { my ($obj) = @{$r->objects || []}; if ($obj) { # We have something to edit - $obj->update_from_cgi($h); + $obj->update_from_cgi($h => { + required => $r->{config}{$r->{table}}{required_cols} || [], + }); } else { - $obj = $self->create_from_cgi($h); + $obj = $self->create_from_cgi($h => { + required => $r->{config}{$r->{table}}{required_cols} || [], + }); $creating++; } if (my %errors = $obj->cgi_update_errors) { -- 2.39.5