From f5a4c248ea1b9e1f7245d218b63109f9b1b87ab7 Mon Sep 17 00:00:00 2001 From: James Meakin <12661555+jmsmkn@users.noreply.github.com> Date: Fri, 3 May 2024 14:37:59 +0200 Subject: [PATCH] Remove totpdevice annotation No longer used after migrating to built in 2FA. --- app/grandchallenge/profiles/admin.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/grandchallenge/profiles/admin.py b/app/grandchallenge/profiles/admin.py index 395b66acf7..0c83a6e761 100644 --- a/app/grandchallenge/profiles/admin.py +++ b/app/grandchallenge/profiles/admin.py @@ -52,17 +52,6 @@ class UserProfileAdmin(UserAdmin): ) actions = (deactivate_users,) - def get_queryset(self, request): - return ( - super() - .get_queryset(request) - .annotate( - totp_device_count=Count( - "totpdevice", filter=Q(totpdevice__confirmed=True) - ) - ) - ) - @admin.display(boolean=True, description="User has 2FA enabled") def has_2fa_enabled(self, obj): return is_mfa_enabled(obj)