From eb7bccc0eadcce12015c26ac280911cf87f09aff Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 16 Mar 2017 18:07:58 +0100 Subject: on conflict update for non-player objects (fix vainglorygame/meta#76) --- api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'api.py') diff --git a/api.py b/api.py index 087c2f6..e58156e 100644 --- a/api.py +++ b/api.py @@ -204,7 +204,8 @@ class Processor(joblib.worker.Worker): return objid, objlmcd async def _into(self, conn, data, table, - conflict="DO NOTHING RETURNING api_id"): + conflict="DO UPDATE SET (\"{1}\") = ({2}) " + + "RETURNING api_id"): """Insert a named tuple into a table. Return the object id.""" items = list(data.items()) -- cgit v1.3.1