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

Fixes #7019: Enable searching VM interfaces by description

jeremystretch 4 лет назад
Родитель
Сommit
bb57600f0f
2 измененных файлов с 10 добавлено и 1 удалено
  1. 8 0
      docs/release-notes/version-2.11.md
  2. 2 1
      netbox/virtualization/filtersets.py

+ 8 - 0
docs/release-notes/version-2.11.md

@@ -1,5 +1,13 @@
 # NetBox v2.11
 
+## v2.11.13 (FUTURE)
+
+### Bug Fixes
+
+* [#7019](https://github.com/netbox-community/netbox/issues/7019) - Enable searching VM interfaces by description
+
+---
+
 ## v2.11.12 (2021-08-23)
 
 ### Enhancements

+ 2 - 1
netbox/virtualization/filtersets.py

@@ -275,5 +275,6 @@ class VMInterfaceFilterSet(PrimaryModelFilterSet):
         if not value.strip():
             return queryset
         return queryset.filter(
-            Q(name__icontains=value)
+            Q(name__icontains=value) |
+            Q(description__icontains=value)
         )