Skip to content

Commit

Permalink
update get_business_revision
Browse files Browse the repository at this point in the history
  • Loading branch information
kzdev420 committed Apr 17, 2024
1 parent 2ae2d8c commit 3428dae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions legal-api/src/legal_api/services/business_details_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ def get_business_revision_obj(filing, business) -> any:
"""Return version object associated with the given filing for a business."""
business_revision = business

if business_revision and business_revision.version == 1:
return business_revision

# The history table has the old revisions, not the current one.
if business_revision and business_revision.change_filing_id != filing.id:
business_version = (
Expand Down Expand Up @@ -821,9 +824,6 @@ def resolution_json(resolution_revision) -> dict:
@staticmethod
def business_revision_json(business_revision, business_json):
"""Return the business revision as a json object."""
if not business_revision:
return business_json

if business_revision.is_legal_entity:
business_json["hasRestrictions"] = business_revision.restriction_ind
business_json["restorationExpiryDate"] = (
Expand Down

0 comments on commit 3428dae

Please sign in to comment.