I\'m making a QA site that is similar to the page you\'re on right now. I\'m attempting to order answers by their score, but answers which have no votes are having their score
You can use the Coalesce function from django.db.models.functions like:
django.db.models.functions
answers = (Answer.objects .filter() .annotate(score=Coalesce(Sum('vote__type'), 0)) .order_by('-score'))