Skip to content

Commit

Permalink
NRO Decommissioning: Allow user to modify cancel from legacy side#25224
Browse files Browse the repository at this point in the history
Signed-off-by: Chen <Steven.Chen@gov.bc.ca>
  • Loading branch information
stevenc987 committed Jan 12, 2025
1 parent 992ca90 commit 00f86b2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/namex/VERSION.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '1.2.21i'
__version__ = '1.2.21j'

8 changes: 6 additions & 2 deletions api/namex/resources/payment_societies.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sqlalchemy.orm.exc import NoResultFound

from namex import jwt
from namex.models import PaymentSociety as PaymentSocietyDAO, Request as RequestDAO, User
from namex.models import State, PaymentSociety as PaymentSocietyDAO, Request as RequestDAO, User
from namex.utils.auth import cors_preflight

from namex.utils.logging import setup_logging
Expand Down Expand Up @@ -121,7 +121,11 @@ def post(self):
ps_instance.save_to_db()
current_app.logger.debug(f'ps_instance saved...')

nrd.stateCd = 'DRAFT'
current_app.logger.debug(f"continue...stateCd is: {nrd.stateCd}")
if nrd.stateCd == State.PENDING_PAYMENT:
nrd.stateCd = 'DRAFT'

current_app.logger.debug(f"continue...stateCd is: {nrd.stateCd}")
nrd.save_to_db()
current_app.logger.debug(f'nrd saved...')

Expand Down

0 comments on commit 00f86b2

Please sign in to comment.