forked from Hanabi/hanabi-league
fix update
This commit is contained in:
parent
7a44378e9e
commit
42b103343c
1 changed files with 3 additions and 1 deletions
|
@ -161,7 +161,9 @@ def store_new_games(games: List[GameInfo]):
|
|||
cur,
|
||||
"INSERT INTO games (id, num_players, variant_id, seed, score, num_turns, datetime_started, datetime_finished) "
|
||||
"VALUES %s "
|
||||
"ON CONFLICT (id) DO NOTHING",
|
||||
"ON CONFLICT (id) DO UPDATE SET"
|
||||
"(num_players, variant_id, seed, score, num_turns, datetime_started, datetime_finished)"
|
||||
"=(excluded.num_players, excluded.variant_id, excluded.seed, excluded.score, excluded.num_turns, excluded.datetime_started, excluded.datetime_finished)",
|
||||
games_vals
|
||||
)
|
||||
psycopg2.extras.execute_values(
|
||||
|
|
Loading…
Reference in a new issue