diff --git a/.travis.yml b/.travis.yml index 0dcbd9ee1..439d1d8f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ language: python python: - "3.6" - "3.7" + - "3.8" install: - pip install -r requirements.txt - pip install pycodestyle diff --git a/docs/index.md b/docs/index.md index ee7f77f69..9dedfedff 100644 --- a/docs/index.md +++ b/docs/index.md @@ -55,7 +55,7 @@ NetBox is built on the [Django](https://djangoproject.com/) Python framework and ## Supported Python Versions -NetBox supports Python 3.6 and 3.7 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.) +NetBox supports Python 3.6, 3.7, and 3.8 environments currently. (Support for Python 3.5 was removed in NetBox v2.8.) ## Getting Started diff --git a/docs/installation/3-netbox.md b/docs/installation/3-netbox.md index 54ecd284a..8ec4b16bd 100644 --- a/docs/installation/3-netbox.md +++ b/docs/installation/3-netbox.md @@ -7,7 +7,7 @@ This section of the documentation discusses installing and configuring the NetBo Begin by installing all system packages required by NetBox and its dependencies. !!! note - NetBox v2.8.0 and later require Python 3.6 or 3.7. This documentation assumes Python 3.6. + NetBox v2.8.0 and later require Python 3.6, 3.7, or 3.8. This documentation assumes Python 3.6. ### Ubuntu diff --git a/netbox/netbox/api/fields.py b/netbox/netbox/api/fields.py index ca66d97d4..e861edc71 100644 --- a/netbox/netbox/api/fields.py +++ b/netbox/netbox/api/fields.py @@ -40,7 +40,7 @@ class ChoiceField(serializers.Field): return super().validate_empty_values(data) def to_representation(self, obj): - if obj is '': + if obj == '': return None return OrderedDict([ ('value', obj), @@ -48,7 +48,7 @@ class ChoiceField(serializers.Field): ]) def to_internal_value(self, data): - if data is '': + if data == '': if self.allow_blank: return data raise ValidationError("This field may not be blank.")