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

Error with data that contains non numeric values in numeric fields #62

Closed
yolile opened this issue Feb 23, 2022 · 1 comment
Closed
Labels
bug Something isn't working
Milestone

Comments

@yolile
Copy link
Member

yolile commented Feb 23, 2022

E.g., when processing colombia_api (kingfisher collection_id 2579), which contains JSON like https://apiocds.colombiacompra.gov.co/apiCCE2.0/rest/release/ocid/ocds-k50g02-31496

Pelican throws:

File "/usr/src/app/contracting_process/resource_level/consistent/tender_value.py", line 75, in calculate

    if (tender_value_amount > 0 and planning_budget_amount_amount < 0) or (
TypeError: '>' not supported between instances of 'dict' and 'int'
@jpmckinney
Copy link
Member

Can be fixed by using deep_get(..., force=int) instead of indexing directly to tender["value"], etc.

@jpmckinney jpmckinney added the bug Something isn't working label Jan 17, 2023
@jpmckinney jpmckinney added this to the Priority milestone Jan 17, 2023
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

No branches or pull requests

2 participants