Commit 595fa989 authored by librebob's avatar librebob

Use backwards compatible upsert method for peewee.

parent 73120ee7
...@@ -38,9 +38,9 @@ def getGame(id): ...@@ -38,9 +38,9 @@ def getGame(id):
return None return None
def setGame(game): def setGame(game):
GameRecord.replace( GameRecord.insert(
id=game.id, id=game.id,
installed=game.installed, installed=game.installed,
last_played_date=game.lastPlayedDate, last_played_date=game.lastPlayedDate,
modified_date=datetime.datetime.now() modified_date=datetime.datetime.now()
).execute() ).on_conflict(action='REPLACE').execute()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment