.
This commit is contained in:
+2
-1
@@ -617,9 +617,10 @@ class LongSeriesView(LoginRequiredMixin, SingleTableMixin, FilterView):
|
|||||||
|
|
||||||
def loadJsonAnswer(answer):
|
def loadJsonAnswer(answer):
|
||||||
eid = int(answer["eid"].split("/")[1])
|
eid = int(answer["eid"].split("/")[1])
|
||||||
|
cid = int(answer["cid"])
|
||||||
|
|
||||||
# As access is not restricted make sure the data appears valid
|
# As access is not restricted make sure the data appears valid
|
||||||
if (not isinstance(answer["cid"], int)) or (
|
if (not isinstance(cid, int)) or (
|
||||||
not isinstance(eid, int) or (not isinstance(answer["ans"], str))
|
not isinstance(eid, int) or (not isinstance(answer["ans"], str))
|
||||||
):
|
):
|
||||||
return False, JsonResponse(
|
return False, JsonResponse(
|
||||||
|
|||||||
+2
-1
@@ -510,9 +510,10 @@ class RapidView(LoginRequiredMixin, SingleTableMixin, FilterView):
|
|||||||
|
|
||||||
def loadJsonAnswer(answer):
|
def loadJsonAnswer(answer):
|
||||||
eid = int(answer["eid"].split("/")[1])
|
eid = int(answer["eid"].split("/")[1])
|
||||||
|
cid = int(answer["cid"])
|
||||||
|
|
||||||
# As access is not restricted make sure the data appears valid
|
# As access is not restricted make sure the data appears valid
|
||||||
if (not isinstance(answer["cid"], int)) or (
|
if (not isinstance(cid, int)) or (
|
||||||
not isinstance(eid, int) or (not isinstance(answer["ans"], str))
|
not isinstance(eid, int) or (not isinstance(answer["ans"], str))
|
||||||
):
|
):
|
||||||
return False, JsonResponse(
|
return False, JsonResponse(
|
||||||
|
|||||||
Reference in New Issue
Block a user