1
0
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:
jeremystretch
2022-04-29 13:09:39 -04:00
parent 9ae25e9449
commit 61d756c7c4
2 changed files with 5 additions and 1 deletions

View File

@ -7,6 +7,10 @@
* [#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
### 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
* extras.CustomField

View File

@ -97,7 +97,7 @@ class BaseTable(tables.Table):
break
if 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):
columns = []