Simplify logic.
This commit is contained in:
parent
ea35f7874c
commit
af7bc08828
|
@ -69,7 +69,8 @@ class ContributionDetail extends React.Component<Props, State> {
|
|||
</p>
|
||||
<pre>{c.refundAddress}</pre>
|
||||
<p>
|
||||
They will be sent an email notifying them of the refund.
|
||||
They will be sent an email notifying them of the refund when you
|
||||
enter the txid below.
|
||||
</p>
|
||||
<Input.Search
|
||||
placeholder="Enter payment txid"
|
||||
|
|
|
@ -87,8 +87,7 @@ def stats():
|
|||
# Count contributions on proposals that didn't get funded for users who have specified a refund address
|
||||
contribution_refundable_count = db.session.query(func.count(ProposalContribution.id)) \
|
||||
.join(Proposal) \
|
||||
.filter(Proposal.stage == ProposalStage.FUNDING_REQUIRED) \
|
||||
.filter(Proposal.date_published + timedelta(seconds=1) * Proposal.deadline_duration < datetime.now()) \
|
||||
.filter(Proposal.stage == ProposalStage.REFUNDING) \
|
||||
.join(ProposalContribution.user) \
|
||||
.join(UserSettings) \
|
||||
.filter(UserSettings.refund_address != None) \
|
||||
|
|
|
@ -153,8 +153,7 @@ class ContributionPagination(Pagination):
|
|||
|
||||
if 'REFUNDABLE' in filters:
|
||||
query = query.join(Proposal) \
|
||||
.filter(Proposal.stage == ProposalStage.FUNDING_REQUIRED) \
|
||||
.filter(Proposal.date_published + timedelta(seconds=1) * Proposal.deadline_duration < datetime.now()) \
|
||||
.filter(Proposal.stage == ProposalStage.REFUNDING) \
|
||||
.join(ProposalContribution.user) \
|
||||
.join(UserSettings) \
|
||||
.filter(UserSettings.refund_address != None) \
|
||||
|
|
Loading…
Reference in New Issue