This commit is contained in:
Ross
2022-08-04 09:58:29 +01:00
parent be70054cf7
commit a2759908c4
4 changed files with 69 additions and 8 deletions
+3
View File
@@ -1,4 +1,5 @@
from collections import defaultdict, Counter
from pathlib import Path
import statistics
import threading
from dal import autocomplete
@@ -1479,6 +1480,8 @@ class ExamViews(View, LoginRequiredMixin):
path = "{0}{1}/exam/{2}.json".format(settings.MEDIA_ROOT, self.app_name, pk)
url = "{0}{1}/exam/{2}.json".format(settings.MEDIA_URL, self.app_name, pk)
Path(path).parent.mkdir(parents=True, exist_ok=True)
if os.path.isfile(path) and not exam.recreate_json:
# exam_json_cache["cached"] = True
# Make sure we pass on an argument if we are forcing a reload