diff --git a/longs/views.py b/longs/views.py index 50d57252..2f8d127e 100755 --- a/longs/views.py +++ b/longs/views.py @@ -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)