fix(pbn): nie dubluj pobierania słownika dyscyplin#597
Merged
Conversation
`sync_disciplines()` samo woła `download_disciplines()`, a dwa call-site (komenda pbn_integrator oraz initial_setup importu) wołały oba pod rząd — podwójny zaciąg słownika z PBN. Usunięto zbędne `download_disciplines()`. Testy: `test_initial_setup` — asercja przeniesiona na `sync_disciplines` (+ `download_disciplines.assert_not_called()` jako straż regresji); wstrzyknięcie błędu kroku dyscyplin przeniesione na realny call-site. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
sync_disciplines()(src/pbn_api/client/disciplines.py:48) sam woładownload_disciplines(). Mimo to dwa call-site wołały oba pod rząd → podwójny zaciąg słownika dyscyplin z PBN:src/pbn_integrator/management/commands/pbn_integrator.pysrc/pbn_import/utils/initial_setup.pyFix
Usunięto zbędne
download_disciplines()przedsync_disciplines()w obu miejscach.Testy
test_initial_setup.py: asercjadownload_disciplines.assert_called_once()→assert_not_called()(straż regresji przed ponownym dublem) +sync_disciplines.assert_called_once(); wstrzyknięcie błędu kroku dyscyplin przeniesione zdownload_disciplinesnasync_disciplines(realny call-site). 7 passed.Faza 0 planu ekstrakcji PBN (#595).
🤖 Generated with Claude Code