Reputation: 141
Here I create an NDB key and load the entity with the .get() method.
GlobalMessagesKey = ndb.Key('TCADBsystem','TCADB','MessageList','Global')
GlobalMessage = GlobalMessagesKey.get()
This returns None. This worked before. Nothing happens with they key in between creating and using the get method ( as you can see in the code ).
What have I done wrong? The key is formatted exactly as the documentation describes it should be.
The entity I reference to with this key is in the datastore with that exact ID and parent. There are no typos and the class used in the key is the same as that of the entity.
Upvotes: 0
Views: 368
Reputation: 141
My entity class used a property named 'parent'. This was a mistake because the 'parent' property is reserved for the datastore. This broke the datastore.
I renamed this property to something else ( not 'parent' ) and it fixed my problem.
Upvotes: 1