From 992bc75c593e6c130d80adbcfeccef47de959e8a 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 4630377c..3a55c397 100644 --- a/teleforma/views/core.py +++ b/teleforma/views/core.py @@ -820,7 +820,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) @@ -832,7 +832,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