Преглед изворни кода

Fixes #19673: Ignore custom field references when compiling table prefetches (#19674)

Jeremy Stretch пре 8 месеци
родитељ
комит
dc8267d890
1 измењених фајлова са 3 додато и 0 уклоњено
  1. 3 0
      netbox/netbox/tables/tables.py

+ 3 - 0
netbox/netbox/tables/tables.py

@@ -66,6 +66,9 @@ class BaseTable(tables.Table):
                 if column.visible:
                     model = getattr(self.Meta, 'model')
                     accessor = column.accessor
+                    if accessor.startswith('custom_field_data__'):
+                        # Ignore custom field references
+                        continue
                     prefetch_path = []
                     for field_name in accessor.split(accessor.SEPARATOR):
                         try: