mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Fix Django compat for Queryset import
This commit is contained in:
parent
e05021c8c6
commit
c0e3e670ca
|
@ -119,7 +119,7 @@ class APIView(View):
|
|||
This allows us to discover information about the view when we do URL
|
||||
reverse lookups. Used for breadcrumb generation.
|
||||
"""
|
||||
if isinstance(getattr(cls, 'queryset', None), models.QuerySet):
|
||||
if isinstance(getattr(cls, 'queryset', None), models.query.QuerySet):
|
||||
def force_evaluation():
|
||||
raise AssertionError(
|
||||
'Do not evaluate the `.queryset` attribute directly, '
|
||||
|
|
Loading…
Reference in New Issue
Block a user