Removed some ghost bracket, hidden rest match and better rendering and score submitting

This commit is contained in:
2026-02-23 01:04:27 +01:00 Verified
parent b152f6fd85
commit 0b3f857f50
5 changed files with 91 additions and 61 deletions
+11 -3
View File
@@ -42,13 +42,17 @@ async def report_score(
if not report.sets:
raise HTTPException(400, "No sets submitted")
if match.winner_team_id:
logic.undo_advancement(db, match)
_apply_score(match, report.sets)
flag_modified(match, "sets")
db.commit()
if match.winner_team_id:
logic.advance_winner(db, match, match.winner_team_id)
db.commit()
await send_ws_update(id)
return SUCCESS
@@ -77,11 +81,12 @@ async def edit_score(
_apply_score(match, report.sets)
flag_modified(match, "sets")
db.commit()
if match.winner_team_id:
logic.advance_winner(db, match, match.winner_team_id)
db.commit()
await send_ws_update(id)
return SUCCESS
@@ -107,7 +112,10 @@ async def clear_score(
logic.undo_advancement(db, match)
match.winner_team_id = None
match.status = MatchStatus.PENDING
if match.p1_team_id and match.p2_team_id:
match.status = MatchStatus.PENDING
else:
match.status = MatchStatus.SCHEDULED
match.sets = []
flag_modified(match, "sets")