Skip to content

Commit

Permalink
Bring load_data in line with latest changes in main repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbacon committed May 11, 2019
1 parent 1734ab0 commit 1cfd30e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,10 @@ def has_us_loc(locs):
"Puerto Rico",
"Virgin Islands (U.S.)",
]
for us_loc in us_locs:
if us_loc in locs:
return True
if locs:
for us_loc in us_locs:
if us_loc in locs:
return True
return False


Expand Down Expand Up @@ -591,8 +592,8 @@ def convert_to_csv():
)

td["keywords"] = dict_or_none(parsed_json, [cs, "keyword"])

writer.writerow(convert_bools_to_ints(td))
if td["act_flag"] or td["included_pact_flag"]:
writer.writerow(convert_bools_to_ints(td))


def main():
Expand Down

0 comments on commit 1cfd30e

Please sign in to comment.