This commit is contained in:
Ross
2022-02-08 10:21:35 +00:00
parent 515ba973c9
commit 11d96a214d
+17 -10
View File
@@ -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):