aboutsummaryrefslogtreecommitdiff
path: root/gn_auth
diff options
context:
space:
mode:
Diffstat (limited to 'gn_auth')
-rw-r--r--gn_auth/auth/authorisation/users/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/gn_auth/auth/authorisation/users/views.py b/gn_auth/auth/authorisation/users/views.py
index 2ad672d..5843393 100644
--- a/gn_auth/auth/authorisation/users/views.py
+++ b/gn_auth/auth/authorisation/users/views.py
@@ -611,6 +611,13 @@ def delete_users():
("user_roles", "user_id"),
("user_verification_codes", "user_id"))
for _table, _col in _dependent_tables:
+ # TODO: Figure out which of these tables leads to an
+ # IntegrityError when attempting to do a delete.
+ # Might have to use code with really dismal performance
+ # here in order to get more information on what fails
+ # and for whom. Maybe a try-catch, with the catch
+ # calling a function that loops through each user and
+ # table, collecting failure stats.
cursor.execute(
f"DELETE FROM {_table} WHERE {_col} IN ({_paramstr})",
_delete)