From 9b5152723a41babaa08a93a2bd2bd9ab3a246a6c Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 19 Jan 2023 10:14:02 -0700 Subject: [PATCH] Add delete admin option --- users/admin.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/users/admin.py b/users/admin.py index c604643..0d04f40 100644 --- a/users/admin.py +++ b/users/admin.py @@ -124,11 +124,16 @@ class IdentityAdmin(admin.ModelAdmin): ) return super().get_search_results(request, queryset, search_term) - @admin.action(description="Force Update") + @admin.action(description="Force update") def force_update(self, request, queryset): for instance in queryset: instance.transition_perform("outdated") + @admin.action(description="Mark as deleted") + def delete(self, request, queryset): + for instance in queryset: + instance.transition_perform("deleted") + @admin.display(description="ActivityPub JSON") def actor_json(self, instance): return instance.to_ap()