Skip to content

Commit

Permalink
adds method to ignore postcodes in import scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
awdem committed May 20, 2024
1 parent 276fa6a commit 7b57bca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions polling_stations/apps/data_importers/base_importers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,10 @@ def should_ignore_uprns(self, record, *uprns_to_ignore):

return record_uprn in uprns_to_ignore

def should_ignore_postcode(self, record, postcodes_to_ignore):
record_postcode = getattr(record, self.residential_postcode_field)
return record_postcode in postcodes_to_ignore


class BaseShpStationsCsvAddressesImporter(
BaseStationsAddressesImporter, CsvMixin, ShpMixin
Expand Down

0 comments on commit 7b57bca

Please sign in to comment.