Fix authors balance query

remotes/origin/hasaccess
Ivlev Denis 8 years ago
parent 1cf32caabf
commit 0a22f816dd
  1. 6
      apps/user/models.py

@ -91,7 +91,11 @@ class User(AbstractUser):
@property
def balance(self):
aggregate = self.balances.filter(type=0).aggregate(
aggregate = self.balances.filter(
type=0,
payment__isnull=False,
payment__status__isnull=False
).aggregate(
models.Sum('amount'),
models.Sum('commission'),
)

Loading…
Cancel
Save