Skip to content Skip to sidebar Skip to footer

Gae: Kinderror When Getting Entities Via Listproperty

I have a Contest entity which uses a ListProperty to store keys of Candidate entities. Here are some details: class Contest(db.Model): candidates = db.ListProperty(db.Key)

Solution 1:

Most likely you're defining Candidate in another module you haven't imported. Where is Candidate defined? Have you imported the module it's in when you call db.get? Calling Candidate.get(key_list) should work, since it forces you to have a valid Candidate when you call it.

Solution 2:

Try this:

c = db.get([str(i) for i in contest.candidates])

Post a Comment for "Gae: Kinderror When Getting Entities Via Listproperty"