.
This commit is contained in:
+2
-2
@@ -320,7 +320,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
for exam in exams:
|
||||
if exam.active:
|
||||
if exam.json_creation_time:
|
||||
creation_time = exam.json_creation_time.isoformat()
|
||||
creation_time = exam.json_creation_time.timestamp()
|
||||
else:
|
||||
creation_time = "None"
|
||||
active_exams["exams"].append(
|
||||
@@ -381,7 +381,7 @@ class ExamViews(View, LoginRequiredMixin):
|
||||
|
||||
with open(path, "w+") as f:
|
||||
exam_json = exam.get_exam_json()
|
||||
exam_json["generated"] = datetime.now().isoformat()
|
||||
exam_json["generated"] = datetime.now().timestamp()
|
||||
f.write(json.dumps(exam_json))
|
||||
|
||||
exam.recreate_json = False
|
||||
|
||||
+1
-1
@@ -182,7 +182,7 @@ class Long(models.Model):
|
||||
"title": "{}",
|
||||
"type": "long",
|
||||
"generated": "{}",
|
||||
""".format(q.history, datetime.datetime.now().isoformat())
|
||||
""".format(q.history, datetime.datetime.now().timestamp())
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user