Skip to content
New issue

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

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

Already on GitHub? # to your account

[CORE-5238] JSON encode params for database endpoint #8

Merged
merged 1 commit into from
Jan 19, 2024

Conversation

cappadona
Copy link
Collaborator

Started seeing this error for get_databases() in our Metabase Open Source Edition instance after upgrading from v0.46.6.4 to v0.47.2

metabase-api_params

@AlbertDeFusco AlbertDeFusco merged commit 05b3234 into master Jan 19, 2024
@cappadona cappadona deleted the CORE-5238/bugfix-metabase-api-get-databases branch January 23, 2024 13:55
cappadona added a commit that referenced this pull request Jan 30, 2024
Followup to #8. JSON encoding the params resulted in URL encoded JSON
object in query string sent to the Metabase API.

The requests package expects a dictionary of strings for `params` [1]
with no rules to encode boolean types [2, 3], so best to keep it simple
and use strings.

[1]: https://docs.python-requests.org/en/latest/user/quickstart/#passing-parameters-in-urls
[2]: psf/requests#2999
[3]: psf/requests#3355
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants