Skip to content

Commit

Permalink
Don't include 'partner' relationships
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Costanzo <[email protected]>
  • Loading branch information
ianco committed Aug 27, 2024
1 parent 23ed4c3 commit d0c6b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data-pipeline/bcreg/bcreg_lear.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def get_unprocessed_corps(self, last_event_id, last_event_dt):
party_roles_version roles
WHERE businesses.id = roles.business_id
AND roles.party_id = parties.id
AND parties.party_type = 'organization' and roles.role in ('proprietor','partner')
AND parties.party_type = 'organization' and roles.role in ('proprietor')
AND (parties.identifier = %s
OR roles.business_id = (select id from businesses where identifier = %s))"""
new_corps = []
Expand Down Expand Up @@ -817,7 +817,7 @@ def get_lear_relationship_info(self, corp_info):
""" + self.get_table_prefix() + """party_roles_version roles
WHERE businesses.id = roles.business_id
AND roles.party_id = parties.id
AND parties.party_type = 'organization' and roles.role in ('proprietor','partner')
AND parties.party_type = 'organization' and roles.role in ('proprietor')
AND (parties.identifier = """ + self.get_db_sql_param() + """
OR roles.business_id = (select id from """ + self.get_table_prefix() + """businesses where identifier = """ + self.get_db_sql_param() + """))
"""
Expand Down

0 comments on commit d0c6b31

Please sign in to comment.