From 4326d905757c92b440b162705fd30b2051674500 Mon Sep 17 00:00:00 2001 From: polling-bot-4000 Date: Tue, 19 Nov 2024 11:02:46 +0000 Subject: [PATCH] Import script for St Helens (2024-12-12) (closes #8159) --- .../management/commands/import_st_helens.py | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/polling_stations/apps/data_importers/management/commands/import_st_helens.py b/polling_stations/apps/data_importers/management/commands/import_st_helens.py index 27718ce6ee..9bd19569ff 100644 --- a/polling_stations/apps/data_importers/management/commands/import_st_helens.py +++ b/polling_stations/apps/data_importers/management/commands/import_st_helens.py @@ -4,27 +4,29 @@ class Command(BaseXpressDemocracyClubCsvImporter): council_id = "SHN" addresses_name = ( - "2024-07-04/2024-05-27T21:11:46.157637/Democracy_Club__04July2024.tsv" + "2024-12-12/2024-11-19T11:02:39.999329/Democracy_Club__12December2024.tsv" ) stations_name = ( - "2024-07-04/2024-05-27T21:11:46.157637/Democracy_Club__04July2024.tsv" + "2024-12-12/2024-11-19T11:02:39.999329/Democracy_Club__12December2024.tsv" ) - elections = ["2024-07-04"] + elections = ["2024-12-12"] csv_delimiter = "\t" - def address_record_to_dict(self, record): - uprn = record.property_urn.strip().lstrip("0") + # Maintaining GE exclusions for future reference - if uprn in [ - "39097215", # 8 PARK AVENUE NORTH, NEWTON-LE-WILLOWS - "39053135", # ROOM 5, COHAB HOUSE, 19 SHAW STREET, ST. HELENS - ]: - return None - if record.addressline6 in [ - # split - "WA10 1HT", - "WA9 3RR", - ]: - return None + # def address_record_to_dict(self, record): + # uprn = record.property_urn.strip().lstrip("0") - return super().address_record_to_dict(record) + # if uprn in [ + # "39097215", # 8 PARK AVENUE NORTH, NEWTON-LE-WILLOWS + # "39053135", # ROOM 5, COHAB HOUSE, 19 SHAW STREET, ST. HELENS + # ]: + # return None + # if record.addressline6 in [ + # # split + # "WA10 1HT", + # "WA9 3RR", + # ]: + # return None + + # return super().address_record_to_dict(record)