8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-05 01:16:27 +00:00

Merge branch 'fix_delete_set' into 'dev'

Fix delete_set form

See merge request federez/re2o!462
This commit is contained in:
klafyvel 2019-10-16 12:26:26 +02:00
commit ef93bd7975

View file

@ -255,7 +255,7 @@ def can_delete_set(model):
all_objects = model.objects.all() all_objects = model.objects.all()
instances_id = [] instances_id = []
for instance in all_objects: for instance in all_objects:
can, _msg = instance.can_delete(request.user) can, _msg, _reason = instance.can_delete(request.user)
if can: if can:
instances_id.append(instance.id) instances_id.append(instance.id)
instances = model.objects.filter(id__in=instances_id) instances = model.objects.filter(id__in=instances_id)