- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
13 lines
986 B
Markdown
13 lines
986 B
Markdown
---
|
|
id: 83dbebd0-b523-4e4d-9351-b1e4fd81999e
|
|
type: fix
|
|
title: "DraftList nested Player.team_id extraction bug"
|
|
tags: [major-domo, python, fix, draft, pydantic, nested-objects]
|
|
importance: 0.7
|
|
confidence: 0.8
|
|
created: "2025-12-11T18:25:14.873571+00:00"
|
|
updated: "2025-12-11T18:25:14.873571+00:00"
|
|
---
|
|
|
|
Fixed auto-draft failure where player.team_id was None for all DraftList entries. Root cause: Pydantic's default nested object creation calls Player(**data) directly, NOT Player.from_api_data(data). Since Player.from_api_data() extracts team_id from nested team object (line 90), but wasn't being called, player.team_id remained None. Fix: Added DraftList.from_api_data() override that explicitly calls Player.from_api_data() and Team.from_api_data() for nested objects. The check 'player.team_id \!= config.free_agent_team_id' was evaluating 'None \!= 547' = True, skipping ALL players. Files: models/draft_list.py (added from_api_data), tests/test_models.py (added regression test).
|