From 09f8861c7241301a54aca1a2de80f359f46f5ee8 Mon Sep 17 00:00:00 2001 From: 1nhann Date: Fri, 26 Aug 2022 15:00:23 +0800 Subject: [PATCH] [delete selected] is unnecessary and useless --- django_apscheduler/admin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/django_apscheduler/admin.py b/django_apscheduler/admin.py index c54f1d9..26839d0 100644 --- a/django_apscheduler/admin.py +++ b/django_apscheduler/admin.py @@ -32,7 +32,13 @@ def __init__(self, model, admin_site): self._job_execution_timeout = getattr( settings, "APSCHEDULER_RUN_NOW_TIMEOUT", 15 ) - + + def get_actions(self, request): + actions = super().get_actions(request) + if 'delete_selected' in actions: + del actions['delete_selected'] + return actions + def get_queryset(self, request): qs = super().get_queryset(request)