Fix game not running
This commit is contained in:
Generated
+369
-494
File diff suppressed because it is too large
Load Diff
@@ -71,12 +71,6 @@ class Settings(BaseSettings):
|
||||
s3_bucket_name: str = "classquiz"
|
||||
s3_base_url: str | None
|
||||
|
||||
class Config:
|
||||
env_file = ".env"
|
||||
env_file_encoding = "utf-8"
|
||||
env_nested_delimiter = "__"
|
||||
extra = "allow"
|
||||
|
||||
|
||||
async def initialize_arq():
|
||||
# skipcq: PYL-W0603
|
||||
|
||||
@@ -384,7 +384,7 @@ async def submit_answer(sid: str, data: dict):
|
||||
print(e)
|
||||
return
|
||||
data.answer = str(data.answer)
|
||||
session = await sio.get_session(sid)
|
||||
session = await get_session(sid, sio)
|
||||
game_data = PlayGame.model_validate_json(await redis.get(f"game:{session['game_pin']}"))
|
||||
answer_right = False
|
||||
if game_data.questions[int(float(data.question_index))].type == QuizQuestionType.ABCD:
|
||||
|
||||
Reference in New Issue
Block a user