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:
|
try:
|
||||||
return super().to_representation(instance)
|
return super().to_representation(instance)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
if isinstance(self.instance, list):
|
||||||
|
for inst in self.instance:
|
||||||
|
inst.delete()
|
||||||
|
else:
|
||||||
self.instance.delete()
|
self.instance.delete()
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
Reference in New Issue