mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-24 09:28:38 -06:00
Closes #6338: Decimal fields are no longer coerced to strings in REST API
This commit is contained in:
parent
f3abf84e17
commit
f6823b5704
@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
* [#5532](https://github.com/netbox-community/netbox/issues/5532) - Drop support for Python 3.6
|
* [#5532](https://github.com/netbox-community/netbox/issues/5532) - Drop support for Python 3.6
|
||||||
* [#5994](https://github.com/netbox-community/netbox/issues/5994) - Drop support for `display_field` argument on ObjectVar
|
* [#5994](https://github.com/netbox-community/netbox/issues/5994) - Drop support for `display_field` argument on ObjectVar
|
||||||
|
* [#6338](https://github.com/netbox-community/netbox/issues/6338) - Decimal fields are no longer coerced to strings in REST API
|
||||||
|
|
||||||
### REST API Changes
|
### REST API Changes
|
||||||
|
|
||||||
@ -22,9 +23,13 @@
|
|||||||
* Removed the `display_name` attribute (use `display` instead)
|
* Removed the `display_name` attribute (use `display` instead)
|
||||||
* dcim.Rack
|
* dcim.Rack
|
||||||
* Removed the `display_name` attribute (use `display` instead)
|
* Removed the `display_name` attribute (use `display` instead)
|
||||||
|
* dcim.Site
|
||||||
|
* `latitude` and `longitude` are now decimal fields rather than strings
|
||||||
* extras.ContentType
|
* extras.ContentType
|
||||||
* Removed the `display_name` attribute (use `display` instead)
|
* Removed the `display_name` attribute (use `display` instead)
|
||||||
* ipam.VLAN
|
* ipam.VLAN
|
||||||
* Removed the `display_name` attribute (use `display` instead)
|
* Removed the `display_name` attribute (use `display` instead)
|
||||||
* ipam.VRF
|
* ipam.VRF
|
||||||
* Removed the `display_name` attribute (use `display` instead)
|
* Removed the `display_name` attribute (use `display` instead)
|
||||||
|
* virtualization.VirtualMachine
|
||||||
|
* `vcpus` is now a decimal field rather than a string
|
||||||
|
@ -464,6 +464,7 @@ FILTERS_NULL_CHOICE_VALUE = 'null'
|
|||||||
REST_FRAMEWORK_VERSION = VERSION.rsplit('.', 1)[0] # Use major.minor as API version
|
REST_FRAMEWORK_VERSION = VERSION.rsplit('.', 1)[0] # Use major.minor as API version
|
||||||
REST_FRAMEWORK = {
|
REST_FRAMEWORK = {
|
||||||
'ALLOWED_VERSIONS': [REST_FRAMEWORK_VERSION],
|
'ALLOWED_VERSIONS': [REST_FRAMEWORK_VERSION],
|
||||||
|
'COERCE_DECIMAL_TO_STRING': False,
|
||||||
'DEFAULT_AUTHENTICATION_CLASSES': (
|
'DEFAULT_AUTHENTICATION_CLASSES': (
|
||||||
'rest_framework.authentication.SessionAuthentication',
|
'rest_framework.authentication.SessionAuthentication',
|
||||||
'netbox.api.authentication.TokenAuthentication',
|
'netbox.api.authentication.TokenAuthentication',
|
||||||
|
Loading…
Reference in New Issue
Block a user