Просмотр исходного кода

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

Jeremy Stretch 8 месяцев назад
Родитель
Сommit
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: