From 59cd9e555d44223f477a444f234fc9c03a1e8ea2 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 12 Nov 2024 18:03:47 -0800 Subject: fix: null check job city --- ami.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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']}", -- cgit v1.2.3