mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Fixes #1268: Fix CSV import error under Python 3
This commit is contained in:
@ -249,7 +249,7 @@ class CSVDataField(forms.CharField):
|
||||
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))
|
||||
|
Reference in New Issue
Block a user