diff antispam/utils.py @ 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 ee87ea74d46b
children 8ddd6490cbc9
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()