Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix office results containing alternates #17

Merged
merged 3 commits into from
Mar 15, 2023

Conversation

digitalaun
Copy link
Contributor

I encountered an issue getting office results for code 2248524. The problem was unlike postaldata.json, alternates in officedata.json were missing the alternates field. This resulted in the following error when instantiating OfficeCodeBase for each alternate:

TypeError("() missing 1 required positional argument: 'alternates'")

My original approach was to modify the results at run time, but in the end I went with modifying prep.py to always include alternates and updated the office data. Let me know if you prefer another approach.

Also renamed a test that was shadowing another one with the same name.

@polm
Copy link
Owner

polm commented Mar 15, 2023

Thanks for catching that, that looks fine to me.

@polm polm merged commit e37952d into polm:master Mar 15, 2023
@polm polm added the bug Something isn't working label Mar 15, 2023
@digitalaun digitalaun deleted the fix-office-alternates branch March 15, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants