summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2016-09-26 13:21:35 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2016-09-26 13:21:35 (GMT)
commita09b17739bb8cb6890ae81a7d961a7cc9979ec04 (patch)
tree479e3cc5d6dca6719421bb88b2a1175d4eafcb8c
parent8ea4c31c33a56ee13c60cdf35db5fe347170698c (diff)
downloadwelco-a09b17739bb8cb6890ae81a7d961a7cc9979ec04.zip
welco-a09b17739bb8cb6890ae81a7d961a7cc9979ec04.tar.gz
welco-a09b17739bb8cb6890ae81a7d961a7cc9979ec04.tar.bz2
alfortville: only remove copie roles for selected mail (#13309)
-rw-r--r--welco/contrib/alfortville/views.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/welco/contrib/alfortville/views.py b/welco/contrib/alfortville/views.py
index 1533d54..892988a 100644
--- a/welco/contrib/alfortville/views.py
+++ b/welco/contrib/alfortville/views.py
@@ -181,7 +181,8 @@ class Copies(DetailView):
Inbox.INFO: request.POST.getlist('info'),
}
for subtype in lists.keys():
- Inbox.objects.filter(subtype=subtype).exclude(
+ Inbox.objects.filter(subtype=subtype).filter(
+ source_pk=kwargs['pk']).exclude(
role_slug__in=lists[subtype]).delete()
mail_content_type = ContentType.objects.get_for_model(Mail)
for subtype in lists.keys():