- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
13 lines
1.1 KiB
Markdown
13 lines
1.1 KiB
Markdown
---
|
|
id: d2e4a41a-c6c4-48c1-9889-fe28f89bc3a0
|
|
type: solution
|
|
title: "Fixed weekly freeze/thaw automation - use_query_params=True"
|
|
tags: [major-domo, discord-bot, fix, freeze-thaw, transaction, api, python]
|
|
importance: 0.9
|
|
confidence: 0.8
|
|
created: "2026-01-13T19:59:34.535238+00:00"
|
|
updated: "2026-01-13T19:59:34.535238+00:00"
|
|
---
|
|
|
|
Root cause: league_service.update_current_state() was calling self.patch() without use_query_params=True. The API expected query params (?week=5&freeze=true) but received JSON body, so database updates silently failed. Fix: Added use_query_params=True to services/league_service.py:99. Also fixed service layer violation in tasks/transaction_freeze.py - now uses player_service.update_player_team() instead of direct API client access. The freeze/thaw logic in transaction_freeze.py was correct all along - Monday checks (weekday==0, hour==0, not current.freeze) and Saturday checks (weekday==5, hour==0, current.freeze) work properly when the API actually updates the database. Test verification: Watch for automatic freeze=False on Saturday 00:00 CST and automatic week increment + freeze=True on Monday 00:00 CST.
|