When i'm trying simply get some objects from db i getting error:

videos = Video.all().fetch(100)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1391, in fetch
    return map(self._model_class.from_entity, raw)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 997, in from_entity
    instance = cls(None, _from_entity=True, **entity_values)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 596, in __init__
    prop.__set__(self, value)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 2581, in __set__
    value = self.validate(value)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 2611, in validate
    if value is not None and not value.has_key():
AttributeError: 'unicode' object has no attribute 'has_key'

It happened after i made some changes in my model properties, and just
trying to migrate data to new schema.
And why Get() method checks required option of property? If i had old
objects with such property with Null value, before i set require
option, i can no get this object after update, because i'll have error
required field error.

--~--~---------~--~----~------------~-------~--~----~
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-appengine@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to