From ecb44d683ef107375578339bd8e539b2d882f23b Mon Sep 17 00:00:00 2001 From: Guillaume Pellerin Date: Wed, 17 Apr 2024 10:23:08 +0200 Subject: [PATCH] add user arg --- teleforma/views/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/teleforma/views/core.py b/teleforma/views/core.py index 1c754224..bd6ffd84 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -798,7 +798,7 @@ class DocumentView(CourseAccessMixin, DetailView): document = Document.objects.get(pk=pk) if get_access(document, courses): if settings.TELEFORMA_PRIVATE_DOCUMENTS_MODE: - path = document.private_file.path + path = document.private_file(request.user).path else: path = document.file.path return serve_media(path, streaming=False) @@ -810,7 +810,7 @@ class DocumentView(CourseAccessMixin, DetailView): document = Document.objects.get(pk=pk) if get_access(document, courses): if settings.TELEFORMA_PRIVATE_DOCUMENTS_MODE: - path = document.private_file.path + path = document.private_file(request.user).path else: path = document.file.path return serve_media(path, streaming=True) -- 2.39.5