Skip to content

Fix schema generation with custom page_size pagination param #4567

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

Merged
merged 1 commit into from
Oct 12, 2016

Conversation

st4lk
Copy link
Contributor

@st4lk st4lk commented Oct 12, 2016

When Pagination class has custom page_size_query_param name, schema generation will throw exception:

rest_framework/schemas.py:361: in get_link
    if fields and any([field.location in ('form', 'body') for field in fields]):
E   AttributeError: 'list' object has no attribute 'location'

@tomchristie
Copy link
Member

Wonderful - thank you!

@tomchristie tomchristie merged commit 2519ce9 into encode:master Oct 12, 2016
@tomchristie tomchristie added this to the 3.5.0 Release milestone Oct 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants