diff options
| author | Tom Christie | 2013-06-18 11:10:56 +0100 | 
|---|---|---|
| committer | Tom Christie | 2013-06-18 11:10:56 +0100 | 
| commit | 6d2ca75d8e2403a17fa7cb2d112f5241a0247226 (patch) | |
| tree | d76e3035c5c88ec88de23030e457f54ca76fc417 /rest_framework/permissions.py | |
| parent | da62987b8225c23513056430e222d40c46466d8e (diff) | |
| download | django-rest-framework-6d2ca75d8e2403a17fa7cb2d112f5241a0247226.tar.bz2 | |
Don't raise AttributeError on views with no model or queryset, when using DjangoModelPermissions
Diffstat (limited to 'rest_framework/permissions.py')
| -rw-r--r-- | rest_framework/permissions.py | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/rest_framework/permissions.py b/rest_framework/permissions.py index 45fcfd66..1036663e 100644 --- a/rest_framework/permissions.py +++ b/rest_framework/permissions.py @@ -128,7 +128,7 @@ class DjangoModelPermissions(BasePermission):          # Workaround to ensure DjangoModelPermissions are not applied          # to the root view when using DefaultRouter. -        if model_cls is None and getattr(view, '_ignore_model_permissions'): +        if model_cls is None and getattr(view, '_ignore_model_permissions', False):              return True          assert model_cls, ('Cannot apply DjangoModelPermissions on a view that' | 
