This commit is contained in:
Ross
2022-04-25 22:47:55 +01:00
parent b804efbcbd
commit a7d7d9adc7
+3
View File
@@ -73,6 +73,9 @@ def user_is_author_or_atlas_editor(function):
def user_is_collection_author_or_atlas_editor(function):
def wrap(request, *args, **kwargs):
if "exam_id" in kwargs:
atlas = CaseCollection.objects.get(pk=kwargs["exam_id"])
else:
atlas = CaseCollection.objects.get(pk=kwargs["pk"])
if (
request.user in atlas.author.all()