be: filter canceled from stats ms payouts count

This commit is contained in:
Aaron 2019-05-27 14:43:50 -05:00
parent 62ffd30208
commit 1ae16004e5
No known key found for this signature in database
GPG Key ID: 3B5B7597106F0A0E
1 changed files with 1 additions and 0 deletions

View File

@ -149,6 +149,7 @@ def stats():
proposal_milestone_payouts_count = db.session.query(func.count(Proposal.id)) \
.join(Proposal.milestones) \
.filter(Proposal.status == ProposalStatus.LIVE) \
.filter(Proposal.stage != ProposalStage.CANCELED) \
.filter(Milestone.stage == MilestoneStage.ACCEPTED) \
.scalar()
# Count contributions on proposals that didn't get funded for users who have specified a refund address