def clear_login_attempts(user):
    if user and user.is_web_user() and user.login_attempts > 0:
        user.login_attempts = 0
        user.save()
dataset/ETHPy150Open dimagi/commcare-hq/corehq/apps/hqwebapp/signals.py/clear_login_attempts/original