Skip to content

Commit

Permalink
Remove state transition from REJECTED to APPROVED
Browse files Browse the repository at this point in the history
  • Loading branch information
rebkwok committed Jun 28, 2024
1 parent ba80cf9 commit 7954bfe
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
3 changes: 0 additions & 3 deletions airlock/business_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1311,9 +1311,6 @@ def get_approved_requests(self, user: User):
RequestStatus.APPROVED: [
RequestStatus.RELEASED,
],
RequestStatus.REJECTED: [
RequestStatus.APPROVED, # allow mind changed
],
}

# The following lists should a) include every status and b) be disjoint
Expand Down
1 change: 0 additions & 1 deletion docs/request-states.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ stateDiagram-v2
RETURNED --> SUBMITTED
RETURNED --> WITHDRAWN
APPROVED --> RELEASED
REJECTED --> APPROVED
```

3 changes: 1 addition & 2 deletions tests/unit/test_business_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def test_provider_get_current_request_for_user_output_checker(bll):
(RequestStatus.REJECTED, RequestStatus.SUBMITTED, False, False, None),
(RequestStatus.REJECTED, RequestStatus.PARTIALLY_REVIEWED, False, False, None),
(RequestStatus.REJECTED, RequestStatus.REVIEWED, False, False, None),
(RequestStatus.REJECTED, RequestStatus.APPROVED, False, True, None),
(RequestStatus.REJECTED, RequestStatus.APPROVED, False, False, None),
(RequestStatus.REJECTED, RequestStatus.WITHDRAWN, False, False, None),
(RequestStatus.RELEASED, RequestStatus.PENDING, False, False, None),
(RequestStatus.RELEASED, RequestStatus.SUBMITTED, False, False, None),
Expand Down Expand Up @@ -1050,7 +1050,6 @@ def test_request_status_ownership(bll):
"request_withdrawn",
),
(RequestStatus.APPROVED, RequestStatus.RELEASED, "checker", "request_released"),
(RequestStatus.REJECTED, RequestStatus.APPROVED, "checker", "request_approved"),
],
)
def test_set_status_notifications(
Expand Down

0 comments on commit 7954bfe

Please sign in to comment.