Skip to content

Fixed issue when cached schools will hang initialization.#98

Merged
schizza merged 2 commits intodevfrom
fix/school_list
Jan 17, 2026
Merged

Fixed issue when cached schools will hang initialization.#98
schizza merged 2 commits intodevfrom
fix/school_list

Conversation

@schizza
Copy link
Owner

@schizza schizza commented Jan 17, 2026

⚠️ PR směřujte do dev. Do main jen release/* nebo hotfix/*.

Copilot AI review requested due to automatic review settings January 17, 2026 09:51
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a critical bug where the initialization process would hang when schools were loaded from cache. The original code incorrectly returned False even when schools were successfully loaded from cache, preventing the configuration flow from completing.

Changes:

  • Fixed _load_schools() to properly return True when schools are loaded from cache
  • Added error tracking and retry mechanism for failed school loading attempts
  • Added exception handling for unexpected errors during school loading

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
custom_components/bakalari/translations/cs.json Added "unknown" error message translation for unexpected errors
custom_components/bakalari/config_flow.py Fixed critical bug where cache-loaded schools returned False instead of True; added error tracking, retry mechanism, and proper task completion checking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@schizza schizza merged commit 06b5567 into dev Jan 17, 2026
3 checks passed
@schizza schizza mentioned this pull request Jan 17, 2026
3 tasks
@schizza schizza deleted the fix/school_list branch January 17, 2026 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants