Skip to content

Commit fc55e5d

Browse files
committed
fix for handling None
1 parent 65825a9 commit fc55e5d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

main.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,10 +384,12 @@ def get_page(page: int) -> Tuple[int, List[Dict[str, Any]]]:
384384
is_minor = None # unknown whether user is a minor
385385
fobs: List[str] = []
386386
for fieldname in NEON_FIELD_NAMES_FOB:
387-
fobs.extend([
388-
x.strip() for x in result.get(fieldname, "").split(",")
389-
if x != ""
390-
])
387+
for tmp in result.get(fieldname, ""):
388+
if not tmp:
389+
continue
390+
fobs.extend([
391+
x.strip() for x in tmp.split(",") if x != ""
392+
])
391393
yield User(
392394
account_id=result["Account ID"],
393395
name=result["Full Name (F)"],

0 commit comments

Comments
 (0)