def search_person(self, firstname, lastname, person_type=None): logging.info("Search person %s %s" % (firstname, lastname)) # Query database with self._database_engine.new_session() as session: dao = PersonDAO(session) member = dao.get_by_name(firstname, lastname) return member.to_dict()
def search_person(self, firstname, lastname): # Query database with self._database_engine.new_session() as session: person_dao = PersonDAO(session) person = person_dao.get_by_name(firstname, lastname) return person.to_dict()
def search_person(self, firstname, lastname, person_type=None): # Query database with self._database_engine.new_session() as session: dao = PersonDAO(session).get_dao(type=person_type) member = dao.get_by_name(firstname, lastname) return member.to_dict()