Exemple #1
0
    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()
Exemple #2
0
 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()