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

Fixes #3223: Fix filtering devices by "has power outlets"

Jeremy Stretch 6 лет назад
Родитель
Сommit
87f5dd05f5
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      CHANGELOG.md
  2. 1 1
      netbox/dcim/filters.py

+ 1 - 0
CHANGELOG.md

@@ -14,6 +14,7 @@
 * [#3150](https://github.com/digitalocean/netbox/issues/3150) - Fix formatting of cable length during cable trace
 * [#3184](https://github.com/digitalocean/netbox/issues/3184) - Correctly display color block for white cables
 * [#3190](https://github.com/digitalocean/netbox/issues/3190) - Fix custom field rendering for Jinja2 export templates
+* [#3223](https://github.com/digitalocean/netbox/issues/3223) - Fix filtering devices by "has power outlets"
 
 ---
 

+ 1 - 1
netbox/dcim/filters.py

@@ -606,7 +606,7 @@ class DeviceFilter(TenancyFilterSet, CustomFieldFilterSet):
         return queryset.exclude(powerports__isnull=value)
 
     def _power_outlets(self, queryset, name, value):
-        return queryset.exclude(poweroutlets_isnull=value)
+        return queryset.exclude(poweroutlets__isnull=value)
 
     def _interfaces(self, queryset, name, value):
         return queryset.exclude(interfaces__isnull=value)