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

Viewsets without a filter_class break Browser Viewer #3559

Closed
ericholscher opened this issue Oct 28, 2015 · 2 comments · Fixed by #3560
Closed

Viewsets without a filter_class break Browser Viewer #3559

ericholscher opened this issue Oct 28, 2015 · 2 comments · Fixed by #3560
Labels
Milestone

Comments

@ericholscher
Copy link
Contributor

The to_html function doesn't check if the cls exists in this line:

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/filters.py#L121

It should have logic checking for a None, similar to the above bit:

https://github.com/tomchristie/django-rest-framework/blob/master/rest_framework/filters.py#L112-L114

Causes this error when viewing those pages: 'NoneType' object is not callable

ericholscher added a commit to ericholscher/django-rest-framework that referenced this issue Oct 28, 2015
Previously it required a filter_class,
or else it would error when calling `cls()`.
This now sets the `filter` context to `None`
if one does not exist.

Fixes encode#3559
@gabn88
Copy link
Contributor

gabn88 commented Oct 28, 2015

Just found the same issue 👍

@jackmccloy
Copy link

👍

@jpadilla jpadilla added the Bug label Oct 28, 2015
@tomchristie tomchristie added this to the 3.3.1 Release milestone Oct 31, 2015
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 a pull request may close this issue.

5 participants