Skip to content

Commit

Permalink
24131 - Fix Director Change Output (#3059)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArwenQin authored Nov 5, 2024
1 parent dd480f5 commit ac49622
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions legal-api/src/legal_api/models/filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -740,9 +740,9 @@ def set_processed(self, business_type):
self.effective_date = self.payment_completion_date

def effective_date_can_be_before_payment_completion_date(self, business_type):
"""For AR or COD filings on CP or BEN then the effective date can be before the payment date."""
"""For AR or COD filings then the effective date can be before the payment date."""
return self.filing_type in (Filing.FILINGS['annualReport'].get('name'),
Filing.FILINGS['changeOfDirectors'].get('name')) and business_type in {'CP', 'BEN'}
Filing.FILINGS['changeOfDirectors'].get('name'))

@staticmethod
def _raise_default_lock_exception():
Expand Down
5 changes: 3 additions & 2 deletions legal-api/tests/unit/core/test_filing.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,15 @@ def test_set_effective(session):

filing.storage.set_processed(legal_type)

# assert that the effective date is the payment date
# assert that the effective date is now, instead of the payment date
assert filing._storage.effective_date
assert filing._storage.effective_date.replace(tzinfo=None) == payment_date.replace(tzinfo=None)
assert filing._storage.effective_date.replace(tzinfo=None) == now.replace(tzinfo=None)
assert not filing.is_future_effective

future_date = now + datedelta.DAY
alt_payment_date = now
filing._storage.skip_status_listener = True
filing._storage.effective_date = now + datedelta.DAY
filing._storage.payment_completion_date = alt_payment_date
filing._storage.save()

Expand Down

0 comments on commit ac49622

Please sign in to comment.