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

Fix for new pagination envelope in Metabase 0.40.0 #32

Merged
merged 1 commit into from
Jul 14, 2021

Conversation

gouline
Copy link
Owner

@gouline gouline commented Jul 14, 2021

Since Metabase 0.40.0, API responses are encapsulated in:

{
    "data": [ "OLD RESPONSE HERE" ],
    "limit": 50,
    "offset": 0,
    "total": 2
}

This change checks if "data" key is present in the root and uses that instead. I will revisit this later, if I need to cater for pagination issues in requests.

@gouline gouline force-pushed the fix/metabase-0.40.0 branch from 4941407 to f58c479 Compare July 14, 2021 02:31
@gouline gouline merged commit 8fd76c5 into master Jul 14, 2021
@gouline gouline deleted the fix/metabase-0.40.0 branch July 14, 2021 02:40
@gouline
Copy link
Owner Author

gouline commented Jul 14, 2021

This change has been backported and released as 0.7.1 to unblock anyone who upgraded their Metabase, but not ready to migrate to 0.8.0 to be released soon with some breaking changes.

@gouline gouline added this to the v0.8.x milestone Jul 28, 2021
@fernandobrito
Copy link
Contributor

Thanks for the good PR description. One of our in-house automation (deactivate inactive Metabase users) started failing after upgrading to 0.40 and your description here made it very easy to understand exactly what has changed 😄 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants