summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-11-12 18:03:47 -0800
committerFuwn <[email protected]>2024-11-12 18:03:47 -0800
commit59cd9e555d44223f477a444f234fc9c03a1e8ea2 (patch)
tree88fa18b1ade43fa7d1d8fb8aabe198c969d27315
parentchore: make main python script executable (diff)
downloadami-59cd9e555d44223f477a444f234fc9c03a1e8ea2.tar.xz
ami-59cd9e555d44223f477a444f234fc9c03a1e8ea2.zip
fix: null check job city
-rwxr-xr-xami.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/ami.py b/ami.py
index 334abbc..45b7605 100755
--- a/ami.py
+++ b/ami.py
@@ -196,7 +196,7 @@ def print_job_table():
for city in (environ.get("TARGET_CITIES") or "").split(","):
fixed_city = city.strip()
- if job["city"].lower() == fixed_city.lower():
+ if job["city"] is not None and job["city"].lower() == fixed_city.lower():
notify(
f"Found job in {fixed_city}",
f"Job ID: {job['jobId']}\nTitle: {job['jobTitle']}\nCity: {job['city']}\nState: {job['state']}\nPay Rate: ${job['totalPayRateMin']} to ${job['totalPayRateMax']} {job['currencyCode']}\nEmployment Type: {job['employmentTypeL10N']}\nDistance: {job['distanceL10N']}",