def search_sport(self, name): # Query database with self._database_engine.new_session() as session: sport_dao = SportDAO(session) sport = sport_dao.get_by_name(name) return sport.to_dict()
def search_sport(self, name): logging.info("Search sport %s" % name) # Query database with self._database_engine.new_session() as session: dao = SportDAO(session) sport = dao.get_by_name(name) return sport.to_dict()