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

Update total population endpoint to return SUM(gerrydbview.total_vap) when total_pop is not present #42

Closed
raphaellaude opened this issue Aug 16, 2024 · 0 comments · Fixed by #43
Assignees
Labels
API bug Something isn't working frontend

Comments

@raphaellaude
Copy link
Collaborator

Currently documents linked to gerrydb views with a total_vap (rather than total_pop) column error because total_pop is hardcoded in the /api/document/{document_id}/total_pop endpoint.

Hot fix this bug by updating get_populations UDF to pull desired column from INFORMATION_SCHEMA. If no population column is present, endpoint should return 404 rather than internal server error.

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

Successfully merging a pull request may close this issue.

1 participant