Skip to content

Commit

Permalink
Update CSV importer usage in admin form
Browse files Browse the repository at this point in the history
While we updated the CSV importer, we didn't
update how it was used in the admin.

This fixes it.
  • Loading branch information
mrchrisadams committed Apr 25, 2024
1 parent c8aafff commit 64e0aa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/greencheck/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 64e0aa8

Please sign in to comment.