summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-06-26 10:52:52 +0100
committerMatthew Hodgson <matthew@matrix.org>2018-06-26 11:57:44 +0100
commit7a32fa01013b1faeace51c71cb98e8a981e79b3b (patch)
tree89e9a92261ce3906f0d8028a6d7079c890016da1
parentMerge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff)
downloadsynapse-7a32fa01013b1faeace51c71cb98e8a981e79b3b.tar.xz
Fix error on deleting users pending deactivation
Use simple_delete instead of simple_delete_one as commented
-rw-r--r--synapse/storage/registration.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py

index 9c9cf46e7f..0d18f6d869 100644 --- a/synapse/storage/registration.py +++ b/synapse/storage/registration.py
@@ -623,7 +623,9 @@ class RegistrationStore(RegistrationWorkerStore, Removes the given user to the table of users who need to be parted from all the rooms they're in, effectively marking that user as fully deactivated. """ - return self._simple_delete_one( + # XXX: This should be simple_delete_one but we failed to put a unique index on + # the table, so somehow duplicate entries have ended up in it. + return self._simple_delete( "users_pending_deactivation", keyvalues={ "user_id": user_id,