diff --git a/api/namex/VERSION.py b/api/namex/VERSION.py index 20e003c1b..8a5abcdfa 100644 --- a/api/namex/VERSION.py +++ b/api/namex/VERSION.py @@ -1,2 +1,2 @@ -__version__ = '1.2.21i' +__version__ = '1.2.21j' diff --git a/api/namex/resources/payment_societies.py b/api/namex/resources/payment_societies.py index 5664593ec..a9397c9ff 100644 --- a/api/namex/resources/payment_societies.py +++ b/api/namex/resources/payment_societies.py @@ -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 @@ -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...')