From 64e0aa823d962a92ed0876b738ed1bf305e2b253 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Thu, 25 Apr 2024 13:02:18 +0200 Subject: [PATCH] Update CSV importer usage in admin form While we updated the CSV importer, we didn't update how it was used in the admin. This fixes it. --- apps/greencheck/forms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/greencheck/forms.py b/apps/greencheck/forms.py index 62b10f15..5c7b892d 100644 --- a/apps/greencheck/forms.py +++ b/apps/greencheck/forms.py @@ -139,7 +139,7 @@ def initialize_importer(self): uploaded_csv_string = self.cleaned_data["csv_file"].read().decode("utf-8") csv_file = io.StringIO(uploaded_csv_string) - importer = CSVImporter(self.cleaned_data["provider"]) + importer = CSVImporter() importable_values = importer.fetch_data_from_source(csv_file) @@ -167,7 +167,7 @@ def save(self): provider = self.cleaned_data["provider"] - self.importer.process_addresses(self.ip_ranges) + self.importer.process(provider, self.ip_ranges) self.processed_ips = self.importer.preview(provider, self.ip_ranges) return self.processed_ips