def get_all(self, environment="development"): d = self.db.mturkconnections.find() if d: for c in d: c['environment'] = environment mtconn = MTurkConnection.deserialize(c) yield mtconn
def get_all(self, environment="development"): d = self.db.mturkconnections.find() if d : for c in d: c['environment']=environment mtconn = MTurkConnection.deserialize(c) yield mtconn
def get_by_email(self, email=None, environment="development"): d = self.db.mturkconnections.find_one({'email' : email}) if not d: return None else: d['environment']=environment return MTurkConnection.deserialize(d)
def get_by_email(self, email=None, environment="development"): #d = self.db.mturkconnections.find_one({'email' : email}) d = self.db.mturkconnections.find_one({}) if not d: return None else: d['email'] = email d['environment'] = environment return MTurkConnection.deserialize(d)