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

Process bulk upload fails if Region10Loader.make_contract() returns None #1594

Closed
toolness opened this Issue Oct 4, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@toolness
Contributor

toolness commented Oct 4, 2017

The bulk upload processing code in data_capture/jobs.py calls Region10Loader.make_contract() (in contracts/loaders/region_10.py) and expects it to always return a contract object or throw an exception. However, looking at the implementation of that function, there is an edge case where it actually returns None. This later causes an exception to be raised, when code further down the pipeline attempts to call update_normalized_labor_category on None.

I think we can fix this by having the edge case raise a ValueError or a ValidationError instead of returning None.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment