def get_chit_by_id(self, hitid):
     d = self.db.chits.find_one({'hitid' : hitid})
     return CHIT.deserialize(d) if d else None
 def get_chit_by_id(self, hitid):
     d = self.db.chits.find_one({'hitid': hitid})
     return CHIT.deserialize(d) if d else None
 def create(self, d):
     chit = CHIT.deserialize(d)
     self.db.chits.insert(chit.serialize())
     return chit
 def create(self, d):
     chit = CHIT.deserialize(d)
     self.db.chits.insert(chit.serialize())
     return chit