Skip to content

Commit

Permalink
Don't add services without branches
Browse files Browse the repository at this point in the history
  • Loading branch information
akariv committed Jul 18, 2024
1 parent e138a15 commit d9cd888
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions operators/entities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ def func(rows: ResourceWrapper):
regNum = row['id']

branches = ga.branches(regNum)
# if len(branches) == 0:
# continue
if len(branches) == 0:
continue
services = ga.services(regNum)
govServices = dict(
(s['relatedMalkarService'], s) for s in services if s.get('serviceGovName') is not None and s.get('relatedMalkarService') is not None
Expand Down Expand Up @@ -436,7 +436,8 @@ def func(rows):
if national:
row['branches'].append(f'guidestar:{orgId}:national')
if len(row['branches']) == 0:
row['organizations'] = [orgId]
stats.increase('Guidestar: Service with no branches')
continue

when = data.pop('whenServiceActive')
if when == 'All Year':
Expand Down

0 comments on commit d9cd888

Please sign in to comment.