Re: [google-appengine] Error if I set "required=False" for a StringListProperty

2010-03-23 Thread Nick Johnson (Google)
Hi,

The only valid value for 'required' is 'True'. If you don't want it to be
required, simply omit the argument altogether.

-Nick Johnson

On Tue, Mar 23, 2010 at 3:09 AM, dhruvbird  wrote:

> Hello,
>  I have a model with a single attribute that is a StringListProperty.
> I get an error if I define it as such:
>
> class Test(db.Expando):
>people = db.StringListProperty(required=False, indexed=True)
>
> However, on changing it to:
> class Test(db.Expando):
>people = db.StringListProperty(required=True, indexed=True,
> default=[])
>
> It starts working. Any ideas why this is happening??
>
> Regards,
> -Dhruv.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To post to this group, send email to google-appeng...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>
>


-- 
Nick Johnson, Developer Programs Engineer, App Engine
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Error if I set "required=False" for a StringListProperty

2010-03-22 Thread dhruvbird
Hello,
  I have a model with a single attribute that is a StringListProperty.
I get an error if I define it as such:

class Test(db.Expando):
people = db.StringListProperty(required=False, indexed=True)

However, on changing it to:
class Test(db.Expando):
people = db.StringListProperty(required=True, indexed=True,
default=[])

It starts working. Any ideas why this is happening??

Regards,
-Dhruv.

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.