mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Closes #9261: NetBoxTable no longer automatically clears pre-existing calls to prefetch_related() on its queryset
This commit is contained in:
@ -7,6 +7,10 @@
|
|||||||
* [#8495](https://github.com/netbox-community/netbox/issues/8495) - Enable custom field grouping
|
* [#8495](https://github.com/netbox-community/netbox/issues/8495) - Enable custom field grouping
|
||||||
* [#8995](https://github.com/netbox-community/netbox/issues/8995) - Enable arbitrary ordering of REST API results
|
* [#8995](https://github.com/netbox-community/netbox/issues/8995) - Enable arbitrary ordering of REST API results
|
||||||
|
|
||||||
|
### Other Changes
|
||||||
|
|
||||||
|
* [#9261](https://github.com/netbox-community/netbox/issues/9261) - `NetBoxTable` no longer automatically clears pre-existing calls to `prefetch_related()` on its queryset
|
||||||
|
|
||||||
### REST API Changes
|
### REST API Changes
|
||||||
|
|
||||||
* extras.CustomField
|
* extras.CustomField
|
||||||
|
@ -97,7 +97,7 @@ class BaseTable(tables.Table):
|
|||||||
break
|
break
|
||||||
if prefetch_path:
|
if prefetch_path:
|
||||||
prefetch_fields.append('__'.join(prefetch_path))
|
prefetch_fields.append('__'.join(prefetch_path))
|
||||||
self.data.data = self.data.data.prefetch_related(None).prefetch_related(*prefetch_fields)
|
self.data.data = self.data.data.prefetch_related(*prefetch_fields)
|
||||||
|
|
||||||
def _get_columns(self, visible=True):
|
def _get_columns(self, visible=True):
|
||||||
columns = []
|
columns = []
|
||||||
|
Reference in New Issue
Block a user