pushers table requires a unique id.

This commit is contained in:
Erik Johnston 2015-04-15 16:24:14 +01:00
parent 806f380a8b
commit ed26e4012b
2 changed files with 11 additions and 3 deletions

View file

@ -99,6 +99,7 @@ class PusherStore(SQLBaseStore):
app_display_name, device_display_name,
pushkey, pushkey_ts, lang, data):
try:
next_id = self._pushers_id_gen.get_next()
yield self._simple_upsert(
PushersTable.table_name,
dict(
@ -115,6 +116,9 @@ class PusherStore(SQLBaseStore):
lang=lang,
data=data
),
insertion_values=dict(
id=next_id,
),
desc="add_pusher",
)
except Exception as e: