def Update(self, drink, force=False): previous = None try: if not force and self.stats: previous = protoutil.DictToProtoMessage(self.stats, models_pb2.Stats()) except TypeError, e: pass
def StatsToProto(record, full=False): return protoutil.DictToProtoMessage(record.stats, models_pb2.Stats())