diff --git a/atlas/decorators.py b/atlas/decorators.py index 89b4b26e..58c154f7 100755 --- a/atlas/decorators.py +++ b/atlas/decorators.py @@ -1,5 +1,5 @@ from django.core.exceptions import PermissionDenied -from .models import Atlas, Series +from .models import Case, Series def user_is_author_or_atlas_series_checker_or_atlas_marker(function): def wrap(request, *args, **kwargs): @@ -25,7 +25,7 @@ def user_is_author_or_atlas_series_checker(function): def user_is_author_or_atlas_checker_or_atlas_marker(function): def wrap(request, *args, **kwargs): - atlas = Atlas.objects.get(pk=kwargs['pk']) + atlas = Case.objects.get(pk=kwargs['pk']) if request.user in atlas.author.all() or request.user.groups.filter(name='atlas_checker').exists() or request.user.groups.filter(name='atlas_marker').exists() or request.user.is_superuser: return function(request, *args, **kwargs) else: @@ -36,7 +36,7 @@ def user_is_author_or_atlas_checker_or_atlas_marker(function): def user_is_author_or_atlas_checker(function): def wrap(request, *args, **kwargs): - atlas = Atlas.objects.get(pk=kwargs['pk']) + atlas = Case.objects.get(pk=kwargs['pk']) if request.user in atlas.author.all() or request.user.groups.filter(name='atlas_checker').exists() or request.user.is_superuser: return function(request, *args, **kwargs) else: