test7
This commit is contained in:
@@ -153,8 +153,7 @@ def get_match_formations(match_id: int, team_id: int) -> list[dict]:
|
|||||||
mf.is_captain,
|
mf.is_captain,
|
||||||
mf.x,
|
mf.x,
|
||||||
mf.y,
|
mf.y,
|
||||||
p.last_name,
|
p.last_name
|
||||||
p.position as position_full
|
|
||||||
FROM match_formations mf
|
FROM match_formations mf
|
||||||
LEFT JOIN players p ON p.id = mf.player_id
|
LEFT JOIN players p ON p.id = mf.player_id
|
||||||
WHERE mf.match_id = %s
|
WHERE mf.match_id = %s
|
||||||
@@ -175,7 +174,6 @@ def get_match_formations(match_id: int, team_id: int) -> list[dict]:
|
|||||||
"x": float(row[5]),
|
"x": float(row[5]),
|
||||||
"y": float(row[6]),
|
"y": float(row[6]),
|
||||||
"last_name": row[7] or "",
|
"last_name": row[7] or "",
|
||||||
"position_full": row[8] or "",
|
|
||||||
}
|
}
|
||||||
for row in rows
|
for row in rows
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -90,7 +90,8 @@ def get_match_lineup_for_editor(
|
|||||||
COALESCE(p.first_name, '') AS first_name,
|
COALESCE(p.first_name, '') AS first_name,
|
||||||
COALESCE(mlp.number::text, '') AS number,
|
COALESCE(mlp.number::text, '') AS number,
|
||||||
COALESCE(mlp.position, '') AS position,
|
COALESCE(mlp.position, '') AS position,
|
||||||
COALESCE(mlp.is_captain, FALSE) AS is_captain
|
COALESCE(mlp.is_captain, FALSE) AS is_captain,
|
||||||
|
p.position as position_full
|
||||||
FROM match_lineup_players mlp
|
FROM match_lineup_players mlp
|
||||||
JOIN players p
|
JOIN players p
|
||||||
ON p.id = mlp.player_id
|
ON p.id = mlp.player_id
|
||||||
@@ -140,6 +141,7 @@ def get_match_lineup_for_editor(
|
|||||||
"first_name": row[6] or "",
|
"first_name": row[6] or "",
|
||||||
"number": row[7] or "",
|
"number": row[7] or "",
|
||||||
"position": row[8] or "",
|
"position": row[8] or "",
|
||||||
|
"position_full ": row[10] or "",
|
||||||
"is_captain": bool(row[9]),
|
"is_captain": bool(row[9]),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user