summaryrefslogtreecommitdiff
path: root/api.py
diff options
context:
space:
mode:
Diffstat (limited to 'api.py')
-rw-r--r--api.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/api.py b/api.py
index b316a6b..47e779f 100644
--- a/api.py
+++ b/api.py
@@ -150,7 +150,10 @@ class Processor(joblib.worker.Worker):
"""Upsert a player named tuple into a table.
Return the object id."""
# save lmcd to restore later
- lmcd = data["last_match_created_date"]
+ lmcd = await conn.fetchval("""
+ SELECT last_match_created_date FROM player
+ WHERE api_id=$1
+ """, data["api_id"])
obj = await self._into(conn, data, table, conflict="""
DO UPDATE SET ("{1}") = ({2})