Skip to content

Commit

Permalink
Merge pull request #317 from ianco/sp-gp-lear
Browse files Browse the repository at this point in the history
Remove partner credentials
  • Loading branch information
WadeBarnes authored Feb 1, 2023
2 parents 1a07532 + cfc7e2a commit 4ac4ce2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion data-pipeline/bcreg/bcreg_lear.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,7 @@ def get_bc_reg_corp_info(self, corp_num):
""" + 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 = '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
2 changes: 1 addition & 1 deletion data-pipeline/bcreg/bcregistries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ def get_bc_reg_corp_info(self, corp_num):
""" + self.get_sec_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 = 'proprietor'
AND (parties.identifier = '""" + lear_corp_num + """'
OR roles.business_id = (select id from """ + self.get_sec_table_prefix() + """businesses
where identifier = '""" + lear_corp_num + """'))
Expand Down
4 changes: 2 additions & 2 deletions data-pipeline/bcreg/eventprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ def is_owned_sole_prop(self, party, corp_num, corp_info):
is_parent = True

# check that self is a sole prop ...
if ((not is_parent) and (corp_info['corp_typ_cd'] in ('SP', 'MF', 'GP'))):
if ((not is_parent) and (corp_info['corp_typ_cd'] in ('SP', 'MF'))):
# ... and parent bus_company_num exists
if (party['bus_company_num'] is not None and 'corp_info' in party and 0 < len(party['corp_info']['corp_num'])):
return True
Expand All @@ -1162,7 +1162,7 @@ def is_owner_of_sole_prop(self, party, corp_num, corp_info):
is_parent = True

# check that child is a sole prop
if (is_parent and 'corp_info' in party and (party['corp_info']['corp_typ_cd'] in ('SP', 'MF', 'GP'))):
if (is_parent and 'corp_info' in party and (party['corp_info']['corp_typ_cd'] in ('SP', 'MF'))):
return True

return False
Expand Down

0 comments on commit 4ac4ce2

Please sign in to comment.