[jifty-devel] Re: [Jifty-commit] r1144 - in jifty/trunk: lib/Jifty/Action/Record

Jesse Vincent jesse at bestpractical.com
Fri Jun 2 14:13:58 EDT 2006


Do we want to be testing for truth or definedness? I'm betting ths will
stop you from creating a record with a value of 0.


On Fri, Jun 02, 2006 at 01:48:34PM -0400, jifty-commit at lists.jifty.org wrote:
> Author: seanmil
> Date: Fri Jun  2 13:48:29 2006
> New Revision: 1144
> 
> Modified:
>    jifty/trunk/   (props changed)
>    jifty/trunk/lib/Jifty/Action/Record/Create.pm
> 
> Log:
>  r327 at pc102:  sean | 2006-06-02 13:46:33 -0400
>  * Skip nonexistant columns when creating records
> 
> 
> Modified: jifty/trunk/lib/Jifty/Action/Record/Create.pm
> ==============================================================================
> --- jifty/trunk/lib/Jifty/Action/Record/Create.pm	(original)
> +++ jifty/trunk/lib/Jifty/Action/Record/Create.pm	Fri Jun  2 13:48:29 2006
> @@ -58,6 +58,9 @@
>  
>      my %values;
>      for (grep { defined $self->argument_value($_) } $self->argument_names) {
> +        # Skip nonexistent fields
> +        next unless $self->record->column($_);
> +
>          $values{$_} = $self->argument_value($_);
>          if (ref $values{$_} eq "Fh") { # CGI.pm's "lightweight filehandle class"
>              local $/;
> _______________________________________________
> Jifty-commit mailing list
> Jifty-commit at lists.jifty.org
> http://lists.jifty.org/cgi-bin/mailman/listinfo/jifty-commit
> 

-- 


More information about the jifty-devel mailing list