From 58656f8d6ab8aca654e96b800aace8cd2c878dc2 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 23 Nov 2021 19:39:00 +0000 Subject: [PATCH] . --- atlas/decorators.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: