From 16d694734b63bb5424ec1f64bebb5daf9a5f90b5 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 14 Jun 2017 09:55:52 -0400 Subject: [PATCH] Fixes #1268: Fix CSV import error under Python 3 --- netbox/utilities/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/utilities/forms.py b/netbox/utilities/forms.py index 16c40a727..dff06d393 100644 --- a/netbox/utilities/forms.py +++ b/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))