From 5f41892e60fc59d6eca3c91983768e61eb75e481 Mon Sep 17 00:00:00 2001 From: ziv Date: Fri, 9 Aug 2024 22:43:03 +0300 Subject: [PATCH] Trim white spaces from beginnint and end of city heb and eng names when loading from data.gov --- anyway/parsers/cities.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/anyway/parsers/cities.py b/anyway/parsers/cities.py index da658b49..830adf37 100644 --- a/anyway/parsers/cities.py +++ b/anyway/parsers/cities.py @@ -47,9 +47,9 @@ def get_city_data_chunks(self, url: str, chunk_size: int) -> Iterable[List[Dict[ logging.debug(f"read {len(data['result']['records'])} records from {url}.") for item in data["result"]["records"]: city_entry = { - "heb_name": item[CITY_NAME], + "heb_name": item[CITY_NAME].lstrip().rstrip(), "yishuv_symbol": item[YISHUV_SYMBOL], - "eng_name": item[CITY_NAME_EN], + "eng_name": item[CITY_NAME_EN].lstrip().rstrip(), # "napa": item[NAPA], # "municipal_stance": item[MUNICIPAL_STANCE], }