From d0c6b313912fe60044cc04f28c64c0d6998d0fa5 Mon Sep 17 00:00:00 2001 From: Ian Costanzo Date: Mon, 26 Aug 2024 18:48:12 -0700 Subject: [PATCH] Don't include 'partner' relationships Signed-off-by: Ian Costanzo --- data-pipeline/bcreg/bcreg_lear.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data-pipeline/bcreg/bcreg_lear.py b/data-pipeline/bcreg/bcreg_lear.py index ec9ec06..56ddb7a 100644 --- a/data-pipeline/bcreg/bcreg_lear.py +++ b/data-pipeline/bcreg/bcreg_lear.py @@ -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 = [] @@ -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() + """)) """