Fix Protocoin bug for new signups crashing portal
This commit is contained in:
parent
8347826d57
commit
c88d5add1f
|
@ -254,7 +254,7 @@ class MemberSerializer(serializers.ModelSerializer):
|
||||||
|
|
||||||
def get_protocoin(self, obj):
|
def get_protocoin(self, obj):
|
||||||
transactions = obj.user.transactions
|
transactions = obj.user.transactions
|
||||||
total = transactions.aggregate(Sum('protocoin'))['protocoin__sum']
|
total = transactions.aggregate(Sum('protocoin'))['protocoin__sum'] or 0
|
||||||
return total
|
return total
|
||||||
|
|
||||||
def update(self, instance, validated_data):
|
def update(self, instance, validated_data):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user