Skip to content

Commit 16f4659

Browse files
committed
[UPDATE] check both *jobWorkplaceTypes and jobWorkplaceTypes, at last, fallback to an empty list
1 parent 084bd74 commit 16f4659

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

job/tasks.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ def process_jobs(account_pk: int, job_pks: list[int]):
261261
job.full_location = job_data["location"]["defaultLocalizedName"]
262262
job.listed_at = job_data["createdAt"]
263263

264-
for workplace_type in job_data["*jobWorkplaceTypes"]:
264+
for workplace_type in job_data.get("*jobWorkplaceTypes") or job_data.get(
265+
"jobWorkplaceTypes", []
266+
):
265267
workplace_type = workplace_type.split(":")[-1]
266268
if workplace_type == "1":
267269
job.on_site = True

0 commit comments

Comments
 (0)