With a query find all the objects that have this faulty reference property.
Create a new property of the correct type and update the objects of the query
You can get rid of the list comprehention, make it a for loop that
fills a list, catch the exception and filter out the objects with the
rogue reference
selectors = []
for selector in self.get_selectors(user):
try:
if selector.quiz.question_count > 0:
selectors.append(selector)
except Error
pass # or update the reference and put() the selector back
2009/8/27 Kambiz Kambiz <[email protected]>:
>
> I recently ignorantly deleted an entity of mine thru the Dashboard.
>
> Now when only my user accesses a certain section of the app, I recieve
> this error:
>
> Traceback (most recent call last):
> File "/base/python_lib/versions/1/google/appengine/ext/webapp/
> __init__.py", line 507, in __call__
> handler.get(*groups)
> File "/base/data/home/apps/appname/1.333395169432469460/
> quizlink.py", line 757, in get
> selectors = [selector for selector in self.get_selectors(user) if
> selector.quiz.question_count > 0]
> File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 2704, in __get__
> raise Error('ReferenceProperty failed to be resolved')
> Error: ReferenceProperty failed to be resolved
>
> Only my username creates this problem, not other's. I'd like to fix
> this, but I can't think of anyway around it. I tried to manually
> recreate the entity thru the Dashboard, with the same ID (112052) but
> that doesnt work as the ID is randomly generated and cannot be edited.
> Anyone have any ideas?
>
> Thanks,
>
> Kambiz
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---