diff --git a/files/routes/comments.py b/files/routes/comments.py index 4141c6b4f..b6405737a 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -299,7 +299,7 @@ def api_comment(v): send_notification(user.id, text) old_badge = user.has_badge(17) - if badge: g.db.delete(badge) + if old_badge: g.db.delete(old_badge) if all_by_author < 10 and not user.has_badge(17):