From aaafe397c10bef0e2b820c52e3efb3bc0b0b5182 Mon Sep 17 00:00:00 2001 From: Ste-KNY Date: Wed, 31 Jan 2024 14:13:25 +0100 Subject: [PATCH] Implement Custom delete_queryset Method in QueueAdmin to Resolve Django 1062 Error --- helpdesk/admin.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/helpdesk/admin.py b/helpdesk/admin.py index f5dc76af..41901cb8 100644 --- a/helpdesk/admin.py +++ b/helpdesk/admin.py @@ -37,6 +37,10 @@ class QueueAdmin(admin.ModelAdmin): else: return "-" + def delete_queryset(self, request, queryset): + for queue in queryset: + queue.delete() + @admin.register(Ticket) class TicketAdmin(admin.ModelAdmin):