changeset 606:c8b4dfb2d1e5

When deactivating spammers, delete their avatar. BB issue #13.
author Brian Neal <bgneal@gmail.com>
date Tue, 24 Jul 2012 18:48:35 -0500
parents a7968613c469
children 34b1dd3f84fa
files antispam/utils.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/antispam/utils.py	Mon Jul 23 19:53:36 2012 -0500
+++ b/antispam/utils.py	Tue Jul 24 18:48:35 2012 -0500
@@ -80,6 +80,7 @@
     profile.status = STA_SPAMMER
     profile.status_date = datetime.datetime.now()
     profile.reset_text_fields()
+    profile.avatar.delete(save=False)
     profile.save()
 
     Comment.objects.filter(user=user).delete()