[Jifty-commit] r4310 - in Jifty-DBI/trunk: lib/Jifty/DBI

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Thu Oct 25 12:48:38 EDT 2007


Author: sartak
Date: Thu Oct 25 12:48:38 2007
New Revision: 4310

Modified:
   Jifty-DBI/trunk/   (props changed)
   Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm

Log:
 r44176 at onn:  sartak | 2007-10-25 12:48:22 -0400
 We don't need to check that a column is mandatory if it's not active


Modified: Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm
==============================================================================
--- Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	(original)
+++ Jifty-DBI/trunk/lib/Jifty/DBI/Record.pm	Thu Oct 25 12:48:38 2007
@@ -1224,6 +1224,9 @@
         if (not defined $attribs{$column->name} and defined $column->default and not ref $column->default) {
             $attribs{$column->name} = $column->default;
         }
+
+        next unless $column->active;
+
         if (not defined $attribs{$column->name} and $column->mandatory and $column->type ne "serial" ) {
             # Enforce "mandatory"
             Carp::carp "Did not supply value for mandatory column ".$column->name;


More information about the Jifty-commit mailing list