diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index 16c40a727a8..dff06d3933e 100644 --- a/netbox/utilities/forms.py +++ b/netbox/utilities/forms.py @@ -249,7 +249,7 @@ def to_python(self, value): reader = csv.reader(value.splitlines()) # Consume and valdiate the first line of CSV data as column headers - headers = reader.next() + headers = next(reader) for f in self.required_fields: if f not in headers: raise forms.ValidationError('Required column header "{}" not found.'.format(f))