From dffa2d3556936248bc6b36848c686930a22a87b0 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 4 Dec 2018 15:09:07 -0500 Subject: [PATCH] Closes #2632: Change representation of null values from 0 to 'null' --- CHANGELOG.md | 2 ++ netbox/netbox/settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d27ed0ff2..034d2eead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ NetBox now supports modeling physical cables for console, power, and interface c * [#2622](https://github.com/digitalocean/netbox/issues/2622) - Enable filtering cables by multiple types/colors * [#2624](https://github.com/digitalocean/netbox/issues/2624) - Delete associated content type and permissions when removing InterfaceConnection model * [#2616](https://github.com/digitalocean/netbox/issues/2616) - Convert Rack `outer_unit` and Cable `length_unit` to integer-based choice fields +* [#2632](https://github.com/digitalocean/netbox/issues/2632) - Change representation of null values from `0` to `null` * [#2639](https://github.com/digitalocean/netbox/issues/2639) - Fix preservation of length/dimensions unit for racks and cables ## API Changes @@ -66,6 +67,7 @@ NetBox now supports modeling physical cables for console, power, and interface c * Added a `description` field to the CircuitTermination serializer * Added `ipaddress_count` to InterfaceSerializer to show the count of assigned IP addresses for each interface * The `available-prefixes` and `available-ips` IPAM endpoints now return an HTTP 204 response instead of HTTP 400 when no new objects can be created +* Filtering on null values now uses the string `null` instead of zero --- diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index d50c07285..0d2b2a066 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -247,7 +247,7 @@ SECRETS_MIN_PUBKEY_SIZE = 2048 # Django filters FILTERS_NULL_CHOICE_LABEL = 'None' -FILTERS_NULL_CHOICE_VALUE = '0' # Must be a string +FILTERS_NULL_CHOICE_VALUE = 'null' # Django REST framework (API) REST_FRAMEWORK_VERSION = VERSION[0:3] # Use major.minor as API version