Formatting
This commit is contained in:
parent
af014cae03
commit
ceab98c3cc
@ -58,9 +58,15 @@ class RequestStatusEvent(Base, mixins.TimestampsMixin, mixins.AuditableMixin):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def simple_name(self):
|
def simple_name(self):
|
||||||
if self.new_status in [RequestStatus.CHANGES_REQUESTED, RequestStatus.CHANGES_REQUESTED_TO_FINVER]:
|
if self.new_status in [
|
||||||
|
RequestStatus.CHANGES_REQUESTED,
|
||||||
|
RequestStatus.CHANGES_REQUESTED_TO_FINVER,
|
||||||
|
]:
|
||||||
return "denied"
|
return "denied"
|
||||||
elif self.new_status == [RequestStatus.PENDING_FINANCIAL_VERIFICATION, RequestStatus.APPROVED]:
|
elif self.new_status == [
|
||||||
|
RequestStatus.PENDING_FINANCIAL_VERIFICATION,
|
||||||
|
RequestStatus.APPROVED,
|
||||||
|
]:
|
||||||
return "accepted"
|
return "accepted"
|
||||||
else:
|
else:
|
||||||
return "pending"
|
return "pending"
|
||||||
|
@ -57,7 +57,9 @@ class RequestsIndex(object):
|
|||||||
|
|
||||||
def _workspace_link_for_request(self, request):
|
def _workspace_link_for_request(self, request):
|
||||||
if request.is_approved:
|
if request.is_approved:
|
||||||
return url_for("workspaces.workspace_projects", workspace_id=request.workspace_id)
|
return url_for(
|
||||||
|
"workspaces.workspace_projects", workspace_id=request.workspace_id
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@ -84,7 +86,7 @@ class RequestsIndex(object):
|
|||||||
"edit_link": url_for("requests.edit", request_id=request.id),
|
"edit_link": url_for("requests.edit", request_id=request.id),
|
||||||
"action_required": request.action_required_by == viewing_role,
|
"action_required": request.action_required_by == viewing_role,
|
||||||
"dod_component": request.latest_revision.dod_component,
|
"dod_component": request.latest_revision.dod_component,
|
||||||
"workspace_link": self._workspace_link_for_request(request)
|
"workspace_link": self._workspace_link_for_request(request),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user