'Did the user already vote for this answer?'

def has_voted(self, request):

    if request.user.is_authenticated():
        qs = AnswerVote.objects.filter(answer=self, creator=request.user)
    elif request.anonymous.has_id:
        anon_id = request.anonymous.anonymous_id
        qs = AnswerVote.objects.filter(answer=self, anonymous_id=anon_id)
    else:
        return False
    return qs.exists()
