Check that request is financially verified before approving
This commit is contained in:
@@ -35,3 +35,11 @@ class Request(Base):
|
|||||||
def annual_spend(self):
|
def annual_spend(self):
|
||||||
monthly = self.body.get("details_of_use", {}).get("estimated_monthly_spend", 0)
|
monthly = self.body.get("details_of_use", {}).get("estimated_monthly_spend", 0)
|
||||||
return monthly * 12
|
return monthly * 12
|
||||||
|
|
||||||
|
@property
|
||||||
|
def financial_verification(self):
|
||||||
|
return self.body.get("financial_verification")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_financially_verified(self):
|
||||||
|
return self.task_order is not None
|
||||||
|
@@ -39,8 +39,7 @@ def update_financial_verification(request_id):
|
|||||||
existing_request.body.get("financial_verification")
|
existing_request.body.get("financial_verification")
|
||||||
)
|
)
|
||||||
updated_request = Requests.update_financial_verification(request_id, form.data)
|
updated_request = Requests.update_financial_verification(request_id, form.data)
|
||||||
if valid:
|
if valid and updated_request.is_financially_verified:
|
||||||
Requests.submit_financial_verification(request_id)
|
|
||||||
new_workspace = Requests.approve_and_create_workspace(updated_request)
|
new_workspace = Requests.approve_and_create_workspace(updated_request)
|
||||||
return redirect(
|
return redirect(
|
||||||
url_for(
|
url_for(
|
||||||
|
Reference in New Issue
Block a user