diff --git a/compose.yaml b/compose.yaml index 677e9ef..30a9ec2 100644 --- a/compose.yaml +++ b/compose.yaml @@ -2,7 +2,7 @@ services: app: - image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:19.0.2 + image: ghcr.io/uberfastman/fantasy-football-metrics-weekly-report:19.0.3 platform: linux/amd64 ports: - "5001:5000" diff --git a/dao/platforms/espn.py b/dao/platforms/espn.py index 4b7b7e9..08113ac 100644 --- a/dao/platforms/espn.py +++ b/dao/platforms/espn.py @@ -389,8 +389,15 @@ def map_data_to_base(self): base_manager.manager_id = manager["id"] base_manager.email = None - base_manager.name = re.sub(r"\W+", " ", f"{manager['firstName']} {manager['lastName']}") - base_manager.nickname = manager["displayName"] + manager_first_name = manager.get( + "firstName", + f"Manager {matchup_team.team_id}" + ) + manager_last_name = manager.get("lastName", "") + base_manager.name = re.sub( + r"\W+", " ", f"{manager_first_name} {manager_last_name}" + ).strip() + base_manager.nickname = manager.get("displayName", None) base_team.managers.append(base_manager)