admin: fix upgrading deletion of tasks when listing
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
5e3628bea6
commit
0eaabbc0f3
|
@ -37,6 +37,10 @@ class TaskSerializer(PassiveSerializer):
|
|||
try:
|
||||
return super().to_representation(instance)
|
||||
except AttributeError:
|
||||
if isinstance(self.instance, list):
|
||||
for inst in self.instance:
|
||||
inst.delete()
|
||||
else:
|
||||
self.instance.delete()
|
||||
return {}
|
||||
|
||||
|
|
Reference in New Issue