Bill,

Agreed.

But if it's by design then is there a design that says so? like
documentation? Otherwise I might consider it a bug.

Ian

On Tue, Mar 3, 2009 at 4:34 AM, Bill <[email protected]> wrote:

>
> Ian,
>
> This is by design and one of my peeves at the moment.  A number of the
> datastore properties will throw an exception when given None values,
> so it makes them useless for storing optional properties.  I think I
> ran into the same problem with LinkProperty and EmailProperty.  The
> general solution is to just use a StringProperty.  You could use a
> "None" marker like "http://nolink"; or "not specified" depending on
> validation of the property, but I find this less appealing.
>
> -Bill
>
> On Mar 2, 4:22 am, Ian Lewis <[email protected]> wrote:
> > I have a model set up with a LinkProperty which is not required however
> when
> > trying to save the entity with a value of None I get a BadValue error
> saying
> > the Link cannot be empty. Is this by design and/or documented somewhere?
> >
> > ...
> > class Profile(db.Model):
> >   ...
> >   homepage = db.LinkProperty(verbose_name=_(u"Homepage
> URL"),required=False)
> >   ...
> >
>


-- 
=======================================
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: [email protected]
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
=======================================

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

Reply via email to