# HG changeset patch # User Brian Neal # Date 1343330290 18000 # Node ID 8ddd6490cbc9a2e8f5f89dd6523d9bed0ab41ef7 # Parent 34b1dd3f84fa6292aae54338c535f5aa307e3dbc Follow up to c8b4dfb2d1e5; delete spammer's avatar if it exists. diff -r 34b1dd3f84fa -r 8ddd6490cbc9 antispam/utils.py --- a/antispam/utils.py Wed Jul 25 19:40:36 2012 -0500 +++ b/antispam/utils.py Thu Jul 26 14:18:10 2012 -0500 @@ -80,7 +80,8 @@ profile.status = STA_SPAMMER profile.status_date = datetime.datetime.now() profile.reset_text_fields() - profile.avatar.delete(save=False) + if profile.avatar: + profile.avatar.delete(save=False) profile.save() Comment.objects.filter(user=user).delete()