I am trying to execute the following query:
query = Comment.query(ancestor = userKey, ndb.OR(Comment.modifiedDate > lastSyncDate, Comment.activityDate > lastSyncDate))
The 1 equal sign (=) is how docs said that we should have it, but my application does not start when I have only one equal sign (build error). If I use two equal signs, for example ancestor == userKey , the application starts, but I get NameError: global name 'ancestor' is not defined . What gives?
I also tried a different version of this query, but the same problem occurs:
query = Comment.query(ndb.AND(ancestor == userKey, ndb.OR(Comment.modifiedDate > lastSyncDate, Comment.activityDate > lastSyncDate)))
source share