Fixed bug where, if no boardgames where missing from plays, data_connection still wanted to ask BGG for empty list
This commit is contained in:
parent
b30ead8ac9
commit
f73accbacc
1 changed files with 3 additions and 2 deletions
|
|
@ -121,6 +121,7 @@ def get_plays(session: Session) -> list[play_classes.Play]:
|
|||
played_boardgame_ids = list(filter(lambda x: x != None, played_boardgame_ids))
|
||||
|
||||
boardgames_in_db, boardgame_ids_missing = db_connection.get_multiple_boardgames(session, boardgame_ids=played_boardgame_ids)
|
||||
if len(boardgame_ids_missing) != 0:
|
||||
missing_boardgames = bgg_connection.get_multiple_boardgames(boardgame_ids_missing)
|
||||
db_connection.upsert_multiple_boardgames(session, missing_boardgames)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue