Allow directly marking committee returned from await review stage

This commit is contained in:
Yingtong Li 2020-03-02 14:31:19 +11:00
parent 0dc5923429
commit 1cd09562a9
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A

View File

@ -185,12 +185,12 @@ class BudgetRevision(models.Model):
return False
if not user.groups.filter(name='Secretary').exists() and not user.groups.filter(name='Treasury').exists():
return False
if self.state == BudgetState.ENDORSED.value or self.state == BudgetState.AWAIT_REVIEW.value or self.state == BudgetState.DRAFT.value or self.state == BudgetState.RESUBMIT.value:
if self.state != BudgetState.APPROVED.value:
return True
return False
def can_cmtereturn(self, user):
if self.state != BudgetState.ENDORSED.value:
if self.state == BudgetState.APPROVED.value:
return False
return self.can_approve(user)