Merge pull request #291 from grant-project/canceled-failed-fix

Don't change proposal to FAILED if it was CANCELED
This commit is contained in:
Daniel Ternyak 2019-03-05 10:43:47 -06:00 committed by GitHub
commit ed4610c17f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ class ProposalDeadline:
from grant.proposal.models import Proposal
proposal = Proposal.query.filter_by(id=task.blob["proposal_id"]).first()
# If it was deleted or successful, just noop out
if not proposal or proposal.is_funded:
# If it was deleted, canceled, or successful, just noop out
if not proposal or proposal.is_funded or proposal.stage != ProposalStage.FUNDING_REQUIRED:
return
# Otherwise, mark it as failed and inform everyone