This commit is contained in:
Ross
2021-03-12 08:57:35 +00:00
parent bf29e0d394
commit 679c4ee90f
+2 -3
View File
@@ -47,6 +47,7 @@ import statistics
import plotly.express as px
from django.core.cache import cache
from django.conf import settings
from helpers.images import image_as_base64
@@ -996,9 +997,7 @@ def question_json(request, pk):
path= "{0}longs/questions/{1}.json".format(settings.MEDIA_ROOT, question_id)
url= "{0}{1}/exam/{2}.json".format(settings.MEDIA_URL, self.app_name, pk)
if os.path.isfile(path) and not exam.recreate_json:
if question_json_cache is not None and not question.recreate_json:
if os.path.isfile(path) and not question.recreate_json:
return redirect(url)
question_json = question.get_json(pk)