🚑 Tried to json.dumps a Pydantic class

This commit is contained in:
Mawoka
2022-06-12 20:59:39 +02:00
parent 82554a15dd
commit db1266d3b7
+1 -1
View File
@@ -202,7 +202,7 @@ async def submit_answer(sid: str, data: dict):
answers.__root__.append(_AnswerData(username=session["username"], answer=data.answer, right=answer_right))
await redis.set(
f"game_session:{session['game_pin']}:{data.question_index}",
json.dumps(answers),
answers.json(),
ex=18000,
)