Skip to content

covid_hosp_facility does not actually support a list of hospital pks #67

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

Closed
brookslogan opened this issue Mar 15, 2023 · 3 comments · Fixed by #74
Closed

covid_hosp_facility does not actually support a list of hospital pks #67

brookslogan opened this issue Mar 15, 2023 · 3 comments · Fixed by #74
Labels
bug Something isn't working P0 Top priority

Comments

@brookslogan
Copy link
Contributor

We should properly validate and document this, rather than returning data for only a single pk.

@brookslogan brookslogan added bug Something isn't working P0 Top priority labels Mar 15, 2023
@dshemetov
Copy link
Contributor

This seems like a bug with the API:

So I think it has something to do with covid_hosp_facility not parsing the %2C%20 character, but specifically in the hospital_pks argument, because it clearly works in the collection_weeks argument (?!).

@melange396
Copy link
Contributor

%2C%20 is two characters; %2C is a comma (the delimter), but %20 is a space (which i would argue doesnt belong in either of those variables/arguments)... the difference is that collection_weeks is parsed as a integer (which apparently silently ignores the space) and hospital_pks is parsed as a string (so its presumably looking for two hospital ids, one of which is "390119" but the other is " 100075" and that id with the leading space does not exist in the database).

@dshemetov
Copy link
Contributor

Thanks for the context @melange396. Didn't realize a space was getting in there. So the error is not in the API, but in the request param formatting in this repo. Partial bug fix in #74, need some help though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P0 Top priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants