def league(self): if self.league_id: return League.get_by_id(self.league_id) return None
def update_league_data(): from app.leagues.models import League League.update_leagues_from_webapi()