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) > ... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
