'Gets a user\'s record, and fixes any duplicates that may have arisen due to get_or_create
race conditions. See https://code.djangoproject.com/ticket/13906 for details.
Use this method in place of `LoginFailures.objects.get(user=user)`'

@classmethod
def _get_record_for_user(cls, user):

    records = LoginFailures.objects.filter(user=user).order_by('-lockout_until')
    for extra_record in records[1:]:
        extra_record.delete()
    return records.get()
