summary refs log tree commit diff
path: root/synapse/storage/registration.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2018-06-26 10:52:52 +0100
committerDavid Baker <dave@matrix.org>2018-06-26 10:52:52 +0100
commit028490afd4c6a9dd9d05586db8510e6bc848703b (patch)
treebb0b5ca96181a4d70faff568f8db7c0d35d69113 /synapse/storage/registration.py
parentMerge pull request #3448 from matrix-org/matthew/gdpr-deactivate-admin-api (diff)
downloadsynapse-028490afd4c6a9dd9d05586db8510e6bc848703b.tar.xz
Fix error on deleting users pending deactivation
Use simple_delete instead of simple_delete_one as commented
Diffstat (limited to 'synapse/storage/registration.py')
-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,