Explorar el Código

Fixes #1268: Fix CSV import error under Python 3

Jeremy Stretch hace 8 años
padre
commit
16d694734b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/utilities/forms.py

+ 1 - 1
netbox/utilities/forms.py

@@ -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))