Skip to content

Commit

Permalink
21777 update check_business_eiligibilty usage (bcgov#2800)
Browse files Browse the repository at this point in the history
  • Loading branch information
kzdev420 authored Jul 3, 2024
1 parent 713ac26 commit a339cea
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ async def _send_first_round_notification(self, batch_processing: BatchProcessing
if email:
# send email letter
_, eligible_details = InvoluntaryDissolutionService.check_business_eligibility(
batch_processing.business_identifier, False
batch_processing.business_identifier,
InvoluntaryDissolutionService.EligibilityFilters(exclude_in_dissolution=False)
)
if eligible_details:
new_furnishing = self._create_new_furnishing(
Expand Down
6 changes: 4 additions & 2 deletions jobs/involuntary-dissolutions/involuntary_dissolutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ def stage_2_process(app: Flask):

for batch_processing in batch_processings:
eligible, _ = InvoluntaryDissolutionService.check_business_eligibility(
batch_processing.business_identifier, exclude_in_dissolution=False
batch_processing.business_identifier,
InvoluntaryDissolutionService.EligibilityFilters(exclude_in_dissolution=False)
)
if eligible:
batch_processing.step = BatchProcessing.BatchProcessingStep.WARNING_LEVEL_2
Expand Down Expand Up @@ -270,7 +271,8 @@ async def stage_3_process(app: Flask, qsm: QueueService):

for batch_processing in batch_processings:
eligible, _ = InvoluntaryDissolutionService.check_business_eligibility(
batch_processing.business_identifier, exclude_in_dissolution=False
batch_processing.business_identifier,
InvoluntaryDissolutionService.EligibilityFilters(exclude_in_dissolution=False)
)
if eligible:
filing = create_invountary_dissolution_filing(batch_processing.business_id)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ def process(business: Business, filing: Dict, filing_meta: FilingMeta, flag_on):

# remove dissolution flag if business can be withdrawn
if flag_on and business.in_dissolution:
eligibility, _ = InvoluntaryDissolutionService.check_business_eligibility(business.identifier, False)
eligibility, _ = InvoluntaryDissolutionService.check_business_eligibility(
business.identifier,
InvoluntaryDissolutionService.EligibilityFilters(exclude_in_dissolution=False)
)
if not eligibility:
batch_processing, _ = InvoluntaryDissolutionService.get_in_dissolution_batch_processing(business.id)
batch_processing.status = BatchProcessing.BatchProcessingStatus.WITHDRAWN.value
Expand Down

0 comments on commit a339cea

Please sign in to comment.