fix: syntax error in betting.py after merge conflict resolution

This commit is contained in:
zovos 2026-05-20 10:24:38 +00:00
parent 60e4cbfcfb
commit acb7421cc0

View file

@ -532,32 +532,7 @@ async def settle_bets() -> list[tuple[int, str]]:
if not winner:
continue
try:
with get_conn() as conn:
cur = conn.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
cur.execute(
"SELECT * FROM bets WHERE match_id = %s AND status = 'pending'",
(match_id,),
)
bets = cur.fetchall()
wcur = conn.cursor()
for bet in bets:
chosen = bet["chosen_team"]
bet_won = (chosen == winner)
if len(score_values) >= 2 and score_values[0][1] == score_values[1][1]:
is_draw = True
winner = "Draw"
else:
max_score = -1
for name, score_val in score_values:
if score_val > max_score:
max_score = score_val
winner = name
if not winner:
continue
is_draw = (winner.casefold() in _DRAW_NAMES or winner == "Draw")
try:
with get_conn() as conn: