google app engine - NDB query giving different results on local versus production environment -
i banging head wall on , hoping can tell me simple thing have overlooked in sleep deprived/noob state.
very doing query , type of object returned different on local machine gets returned once deploy application.
match = matchrealtimestatsmodel.querymatch(ancestor_key)[0]
on local machine above produces matchrealtimestatsmodel object. can run following lines without problem:
logging.info(match) # outputs matchrealtimestatsmodel object logging.info(match.match) # outputs dictionary json data
when above 2 lines run on goggles machines following though:
logging.info(match) # outputs dictionary json data logging.info(match.match) # attributeerror: 'dict' object has no attribute 'match'
any suggestions might causing this? cleared data store , did think of clean gae environment.
edit #1: adding matchrealtimestatsmodel code:
class matchrealtimestatsmodel(ndb.model): match = ndb.jsonproperty() @classmethod def querymatch(cls, ancestor_key): return cls.query(ancestor=ancestor_key).fetch()
and here actual call:
ancestor_key = ndb.key('matchrealtimestatsmodel', matchuniqueurl) match = matchrealtimestatsmodel.querymatch(ancestor_key)[0]
perhaps using different versions of code locally in prod? try reset copy of source code in both places.
Comments
Post a Comment