Skip to content

Commit

Permalink
fix casc import
Browse files Browse the repository at this point in the history
  • Loading branch information
drkane committed May 26, 2024
1 parent 67c7c40 commit 3780f16
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ftc/management/commands/import_casc.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ def parse_row(self, record):
self.coynos[record["casc_orgid"]] = record["ch_orgid"]
return

address = dict(
enumerate([v.strip() for v in record["address"].split(",", maxsplit=2)])
)
address = {}
if record.get("address", None):
address = dict(
enumerate([v.strip() for v in record["address"].split(",", maxsplit=2)])
)
org_ids = [record["id"]]
orgtypes = [
self.orgtype_cache["community-amateur-sports-club"],
Expand Down

0 comments on commit 3780f16

Please sign in to comment.