Skip to content

Commit

Permalink
25159 - Update NoW filing not Saving temp_reg for T business (bcgov#3170
Browse files Browse the repository at this point in the history
)

* set temp_reg to none for T business NoW filing
* update unit tests
  • Loading branch information
eason-pan-bc authored Jan 14, 2025
1 parent aba0548 commit 44a721d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ def save_filing(client_request: LocalProxy, # pylint: disable=too-many-return-s

if filing.filing_type == Filing.FILINGS['noticeOfWithdrawal']['name']:
ListFilingResource.link_now_and_withdrawn_filing(filing)
if business_identifier.startswith('T'):
filing.temp_reg = None
filing.save()
except BusinessException as err:
return None, None, {'error': err.error}, err.status_code
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1608,8 +1608,8 @@ def test_resubmit_filing_failed(session, client, jwt, filing_status, review_stat
('REGULAR-BUSINESS-DISSOLUTION', 'CBEN', 'dissolution', DISSOLUTION, False)
]
)
def test_notice_of_withdraw_filing(session, client, jwt, test_name, legal_type, filing_type, filing_json, is_temp):
"""Assert that notice of withdraw for new business filings can be filed"""
def test_notice_of_withdrawal_filing(session, client, jwt, test_name, legal_type, filing_type, filing_json, is_temp):
"""Assert that notice of withdrawal for new business filings can be filed"""
today = datetime.utcnow().date()
future_effective_date = today + timedelta(days=5)
future_effective_date = future_effective_date.isoformat()
Expand Down Expand Up @@ -1702,3 +1702,5 @@ def test_notice_of_withdraw_filing(session, client, jwt, test_name, legal_type,
now_filing = (Filing.find_by_id(rv_draft.json['filing']['header']['filingId']))
assert now_filing.withdrawn_filing_id == withdrawn_filing.id
assert now_filing.withdrawal_pending == False
if is_temp:
assert now_filing.temp_reg == None

0 comments on commit 44a721d

Please sign in to comment.