diff --git a/apiserver/apiserver/api/serializers.py b/apiserver/apiserver/api/serializers.py index 77f6f38..20ece48 100644 --- a/apiserver/apiserver/api/serializers.py +++ b/apiserver/apiserver/api/serializers.py @@ -254,7 +254,7 @@ class MemberSerializer(serializers.ModelSerializer): def get_protocoin(self, obj): transactions = obj.user.transactions - total = transactions.aggregate(Sum('protocoin'))['protocoin__sum'] + total = transactions.aggregate(Sum('protocoin'))['protocoin__sum'] or 0 return total def update(self, instance, validated_data):