fifa17-recon: fix active squad resetting on reload

FIFA's updateActiveSquad PUT stores each slot as itemData={id:<clubItemId>}
(a reference), not the full player. We saved the bare references, so the
squad reloaded empty ("active squad resets"). Add Store.reconstruct_squad()
to re-embed the full club item by id on GET /squad/0, so the saved squad
reloads with its real players.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PN5bmpDVQR1aXgefyWAt7o
This commit is contained in:
funman300
2026-08-02 09:56:18 -07:00
parent 1b2319635d
commit 89dc9baa61
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -204,7 +204,7 @@ def squad_route(h):
STORE.save_squad(sq)
return 200, sq
saved = STORE.active_squad()
return 200, (saved if saved else SQUAD)
return 200, (STORE.reconstruct_squad(saved) if saved else SQUAD)
# ---- STORE / PACKS (first-cut; iterate against the log) ---------------------