Skip to content

Commit

Permalink
NRO Decommissioning: Allow user to modify cancel from legacy side#252…
Browse files Browse the repository at this point in the history
…24 (#1661)

Signed-off-by: Steven Chen <[email protected]>
  • Loading branch information
stevenc987 authored Jan 11, 2025
1 parent 4f41b23 commit de0b778
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/namex/VERSION.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.2.21'
__version__ = '1.2.21b'
5 changes: 5 additions & 0 deletions api/namex/services/name_request/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ def valid_state_transition(user, nr, new_state):
:param new_state:
:return: (bool)
"""
# when the legacy user just created a new NR from legacy side, the user should be allowed to
# modify and cancel it from the legacy side (while the NR still in DRAFT state).
if nr.stateCd == State.DRAFT and (new_state == State.DRAFT or new_state == State.CANCELLED):
return True

if (new_state in (State.APPROVED,
State.REJECTED,
State.CONDITIONAL)) \
Expand Down

0 comments on commit de0b778

Please sign in to comment.