From 11d96a214da839dce0ecc9b983aba54488dda9c7 Mon Sep 17 00:00:00 2001 From: Ross Date: Tue, 8 Feb 2022 10:21:35 +0000 Subject: [PATCH] . --- generic/views.py | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/generic/views.py b/generic/views.py index c32ff249..798df5e6 100644 --- a/generic/views.py +++ b/generic/views.py @@ -1404,21 +1404,28 @@ def group_email(request, pk, resend=False): else: users = group.ciduser_set.filter(active=True, login_email_sent=False) - sent = [] - not_sent = [] - for u in users: - success, msg = u.email_details(resend=resend) - if success: - sent.append(u) - else: - not_sent.append((u, msg)) - return render( request, "generic/group_emailed.html", - {"sent": sent, "not_sent": not_sent, "users_count": users.count()}, + #{"sent": sent, "not_sent": not_sent, "users_count": users.count()}, + {"users": users, "users_count": users.count()}, ) + #sent = [] + #not_sent = [] + #for u in users: + # success, msg = u.email_details(resend=resend) + # if success: + # sent.append(u) + # else: + # not_sent.append((u, msg)) + + #return render( + # request, + # "generic/group_emailed.html", + # {"sent": sent, "not_sent": not_sent, "users_count": users.count()}, + #) + @user_is_cid_user_manager def group_email_results(request, pk, resend=False):