From 114413ba8017ef38440757f5d10dc12632cbda8e Mon Sep 17 00:00:00 2001 From: Andrew Williams Date: Tue, 15 Mar 2011 10:42:54 +0000 Subject: [PATCH] Present the group list as a nice list --- app/hr/tasks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/hr/tasks.py b/app/hr/tasks.py index 88e12e7..9ba2ce8 100644 --- a/app/hr/tasks.py +++ b/app/hr/tasks.py @@ -23,5 +23,5 @@ def blacklist_check(): blstr = "" for i in val: blstr = "%s%s - %s - %s\n" % (blstr, i.get_type_display(), i.value, i.reason) - msg = "Suspect User found: %s\nGroups: %s\nBlacklist Items:\n\n%s" % (u.username, u.groups.all().values_list('name'), blstr) + msg = "Suspect User found: %s\nGroups: %s\nBlacklist Items:\n\n%s" % (u.username, ", ".join(u.groups.all().values_list('name', flat=True)), blstr) send_mail('Automated blacklist checker alert - %s' % u.username, msg, 'blacklist@pleaseignore.com', ['abuse@pleaseignore.com'])