From 0eaabbc0f31122aec6536432179835af2ac862a0 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 3 Jun 2021 17:42:13 +0200 Subject: [PATCH] admin: fix upgrading deletion of tasks when listing Signed-off-by: Jens Langhammer --- authentik/admin/api/tasks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/authentik/admin/api/tasks.py b/authentik/admin/api/tasks.py index e425255a7..5ea6e3678 100644 --- a/authentik/admin/api/tasks.py +++ b/authentik/admin/api/tasks.py @@ -37,7 +37,11 @@ class TaskSerializer(PassiveSerializer): try: return super().to_representation(instance) except AttributeError: - self.instance.delete() + if isinstance(self.instance, list): + for inst in self.instance: + inst.delete() + else: + self.instance.delete() return {}