This commit is contained in:
Ross
2021-09-09 19:05:00 +01:00
parent b8d3e9bca0
commit e3fbde8e39
+3 -2
View File
@@ -1,3 +1,4 @@
from django.contrib.contenttypes.models import ContentType
from django.shortcuts import render, get_object_or_404, redirect
from django.contrib.auth.decorators import login_required, user_passes_test
@@ -43,13 +44,13 @@ import os
def get_question_and_content_type(question_type):
if question_type == "rapid":
question = Rapid
question = RapidQuestion
content_type = ContentType.objects.get(model="rapid")
elif question_type == "anatomy":
question = AnatomyQuestion
content_type = ContentType.objects.get(model="anatomyquestion")
elif question_type == "long":
question = Long
question = LongQuestion
content_type = ContentType.objects.get(model="long")
else:
raise PermissionError()