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

fix #4459 - Fix caching issue resulting in erroneous nested data for regions, rack groups, and tenant groups

This commit is contained in:
John Anderson
2020-04-22 16:45:26 -04:00
parent 5ea92dda4b
commit 11ee6f417f
2 changed files with 19 additions and 0 deletions

View File

@ -14,10 +14,26 @@
* [#4336](https://github.com/netbox-community/netbox/issues/4336) - Ensure interfaces without a subinterface ID are ordered before subinterface zero * [#4336](https://github.com/netbox-community/netbox/issues/4336) - Ensure interfaces without a subinterface ID are ordered before subinterface zero
* [#4361](https://github.com/netbox-community/netbox/issues/4361) - Fix Type of `connection_state` in Swagger schema * [#4361](https://github.com/netbox-community/netbox/issues/4361) - Fix Type of `connection_state` in Swagger schema
* [#4388](https://github.com/netbox-community/netbox/issues/4388) - Fix detection of connected endpoints when connecting rear ports * [#4388](https://github.com/netbox-community/netbox/issues/4388) - Fix detection of connected endpoints when connecting rear ports
* [#4459](https://github.com/netbox-community/netbox/issues/4459) - Fix caching issue resulting in erroneous nested data for regions, rack groups, and tenant groups
* [#4489](https://github.com/netbox-community/netbox/issues/4489) - Fix display of parent/child role on device type view * [#4489](https://github.com/netbox-community/netbox/issues/4489) - Fix display of parent/child role on device type view
* [#4496](https://github.com/netbox-community/netbox/issues/4496) - Fix exception when validating certain models via REST API * [#4496](https://github.com/netbox-community/netbox/issues/4496) - Fix exception when validating certain models via REST API
* [#4510](https://github.com/netbox-community/netbox/issues/4510) - Enforce address family for device primary IPv4/v6 addresses * [#4510](https://github.com/netbox-community/netbox/issues/4510) - Enforce address family for device primary IPv4/v6 addresses
### Notes
In accordance with the fix in [#4459](https://github.com/netbox-community/netbox/issues/4459), users that are experiencing invalid nested data with
regions, rack groups, or tenant groups can preform a one time operation using the NetBox shell to rebuild the correct nested relationships after upgrading:
```text
$ python netbox/manage.py nbshell
### NetBox interactive shell (Mac-Pro.local)
### Python 3.6.4 | Django 3.0.5 | NetBox 2.8.1-dev
### lsmodels() will show available models. Use help(<model>) for more info.
>>> Region.objects.rebuild()
>>> RackGroup.objects.rebuild()
>>> TenantGroup.objects.rebuild()
```
--- ---
## v2.8.0 (2020-04-13) ## v2.8.0 (2020-04-13)

View File

@ -479,11 +479,14 @@ CACHEOPS = {
'auth.*': {'ops': ('fetch', 'get')}, 'auth.*': {'ops': ('fetch', 'get')},
'auth.permission': {'ops': 'all'}, 'auth.permission': {'ops': 'all'},
'circuits.*': {'ops': 'all'}, 'circuits.*': {'ops': 'all'},
'dcim.region': None, # MPTT models are exempt due to raw sql
'dcim.rackgroup': None, # MPTT models are exempt due to raw sql
'dcim.*': {'ops': 'all'}, 'dcim.*': {'ops': 'all'},
'ipam.*': {'ops': 'all'}, 'ipam.*': {'ops': 'all'},
'extras.*': {'ops': 'all'}, 'extras.*': {'ops': 'all'},
'secrets.*': {'ops': 'all'}, 'secrets.*': {'ops': 'all'},
'users.*': {'ops': 'all'}, 'users.*': {'ops': 'all'},
'tenancy.tenantgroup': None, # MPTT models are exempt due to raw sql
'tenancy.*': {'ops': 'all'}, 'tenancy.*': {'ops': 'all'},
'virtualization.*': {'ops': 'all'}, 'virtualization.*': {'ops': 'all'},
} }