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

Fixes #5085: Fix ordering by assignment in IP addresses table

Jeremy Stretch 5 лет назад
Родитель
Сommit
6305a35a4f
2 измененных файлов с 5 добавлено и 0 удалено
  1. 1 0
      docs/release-notes/version-2.9.md
  2. 4 0
      netbox/ipam/tables.py

+ 1 - 0
docs/release-notes/version-2.9.md

@@ -8,6 +8,7 @@
 * [#5074](https://github.com/netbox-community/netbox/issues/5074) - Fix inclusion of VC member interfaces when viewing VC master
 * [#5078](https://github.com/netbox-community/netbox/issues/5078) - Fix assignment of existing IP addresses to interfaces via web UI
 * [#5081](https://github.com/netbox-community/netbox/issues/5081) - Fix exception during webhook processing with custom select field
+* [#5085](https://github.com/netbox-community/netbox/issues/5085) - Fix ordering by assignment in IP addresses table
 * [#5087](https://github.com/netbox-community/netbox/issues/5087) - Restore label field when editing console server ports, power ports, and power outlets
 
 ---

+ 4 - 0
netbox/ipam/tables.py

@@ -415,6 +415,10 @@ class IPAddressDetailTable(IPAddressTable):
     tenant = tables.TemplateColumn(
         template_code=COL_TENANT
     )
+    assigned = tables.BooleanColumn(
+        accessor='assigned_object_id',
+        verbose_name='Assigned'
+    )
     tags = TagColumn(
         url_name='ipam:ipaddress_list'
     )