From a505a77f30ff732971d688bcc3a4bb3c0d986bb0 Mon Sep 17 00:00:00 2001 From: polling-bot-4000 Date: Thu, 20 Jun 2024 13:52:50 +0100 Subject: [PATCH] Import script for Newham (2024-07-04) (closes #7892) --- .../management/commands/import_newham.py | 35 ++----------------- 1 file changed, 2 insertions(+), 33 deletions(-) diff --git a/polling_stations/apps/data_importers/management/commands/import_newham.py b/polling_stations/apps/data_importers/management/commands/import_newham.py index 7f7097e3fc..9c6a7362ad 100644 --- a/polling_stations/apps/data_importers/management/commands/import_newham.py +++ b/polling_stations/apps/data_importers/management/commands/import_newham.py @@ -3,38 +3,7 @@ class Command(BaseXpressDemocracyClubCsvImporter): council_id = "NWM" - addresses_name = ( - "2024-07-04/2024-06-10T08:52:12.277173/Democracy_Club__04July2024.tsv" - ) - stations_name = ( - "2024-07-04/2024-06-10T08:52:12.277173/Democracy_Club__04July2024.tsv" - ) + addresses_name = "2024-07-04/2024-06-20T13:52:40.152721/ForestGateNorthandMaryland_Democracy_Club__04July2024.tsv" + stations_name = "2024-07-04/2024-06-20T13:52:40.152721/ForestGateNorthandMaryland_Democracy_Club__04July2024.tsv" elections = ["2024-07-04"] csv_delimiter = "\t" - - def address_record_to_dict(self, record): - uprn = record.property_urn.strip().lstrip("0") - - if uprn in [ - "10023995039", # FLAT AT THE DOCKLANDS EQUESTRIAN CENTRE 2 CLAPS GATE LANE, BECKTON, LONDON - "10094880629", # FLAT 1 200 THE GROVE, STRATFORD, LONDON - "10009003474", # FLAT 2 200 THE GROVE, STRATFORD, LONDON - "10009003475", # FLAT 3 200 THE GROVE, STRATFORD, LONDON - "46001049", # 96 ALDERSBROOK ROAD, LONDON - "10012838007", # FLAT ABOVE 24 STEPHENSON STREET, CANNING TOWN, LONDON - "10012838012", # FLAT, 162 BIDDER STREET, LONDON - "10093472922", # ALAIN CODY DOCK 11C SOUTH CRESCENT, CANNING TOWN, LONDON - "10093472923", # MADORCHA CODY DOCK 11C SOUTH CRESCENT, CANNING TOWN, LONDON - ]: - return None - - if record.addressline6 in [ - # split - "E13 0DZ", - # looks wrong - "E15 1BQ", - "E15 1BG", - ]: - return None - - return super().address_record_to_dict(record)