1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Import unicode_literals

This commit is contained in:
Jeremy Stretch
2017-05-24 11:33:11 -04:00
parent 9aad8a7774
commit f21c6bca00
109 changed files with 320 additions and 131 deletions

View File

@ -1,3 +1,4 @@
from __future__ import unicode_literals
from collections import OrderedDict
from django import forms
@ -104,7 +105,7 @@ class CustomFieldForm(forms.ModelForm):
obj_id=self.instance.pk)
except CustomFieldValue.DoesNotExist:
# Skip this field if none exists already and its value is empty
if self.cleaned_data[field_name] in [None, u'']:
if self.cleaned_data[field_name] in [None, '']:
continue
cfv = CustomFieldValue(
field=self.fields[field_name].model,