Mercurial > public > sg101
changeset 608:8ddd6490cbc9
Follow up to c8b4dfb2d1e5; delete spammer's avatar if it exists.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Thu, 26 Jul 2012 14:18:10 -0500 |
parents | 34b1dd3f84fa |
children | 678a1a2ef55a |
files | antispam/utils.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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()