diff options
| author | Fuwn <[email protected]> | 2024-11-11 22:08:48 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-11-11 22:08:48 -0800 |
| commit | 2590d36f69ef55ce13f1699583a88f30969b172e (patch) | |
| tree | 77ec020e8d07f7f92f7d975265313d121effbd03 | |
| parent | feat: optional logging (diff) | |
| download | ami-2590d36f69ef55ce13f1699583a88f30969b172e.tar.xz ami-2590d36f69ef55ce13f1699583a88f30969b172e.zip | |
refactor: move target cities variable into immediate use
| -rw-r--r-- | ami.py | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -19,8 +19,6 @@ location = geolocator.geocode(environ.get("LOCATION"), addressdetails=True) client.inject_token(environ.get("AUTHORIZATION"), "authorization") -target_cities = environ.get("TARGET_CITIES") or "" - def log_response(data): log = environ.get("LOG") @@ -195,7 +193,7 @@ def print_job_table(): ) for job in json_api_data["data"]["searchJobCardsByLocation"]["jobCards"]: - for city in target_cities.split(","): + for city in (environ.get("TARGET_CITIES") or "").split(","): fixed_city = city.strip() if job["city"].lower() == fixed_city.lower(): |