diff options
author | David Baker <dave@matrix.org> | 2018-06-26 10:52:52 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2018-06-26 10:52:52 +0100 |
commit | 028490afd4c6a9dd9d05586db8510e6bc848703b (patch) | |
tree | bb0b5ca96181a4d70faff568f8db7c0d35d69113 /synapse/storage | |
parent | Merge pull request #3448 from matrix-org/matthew/gdpr-deactivate-admin-api (diff) | |
download | synapse-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')
-rw-r--r-- | synapse/storage/registration.py | 4 |
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, |