Explorar el Código

Fixes #2864: Correct display of VRF name when no RD is assigned

Jeremy Stretch hace 7 años
padre
commit
375e66047d
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. 1 0
      CHANGELOG.md
  2. 2 2
      netbox/ipam/models.py

+ 1 - 0
CHANGELOG.md

@@ -7,6 +7,7 @@ v2.5.6 (FUTURE)
 * [#2845](https://github.com/digitalocean/netbox/issues/2845) - Enable filtering of rack unit list by unit ID
 * [#2856](https://github.com/digitalocean/netbox/issues/2856) - Fix navigation links between LAG interfaces and their members on device view
 * [#2857](https://github.com/digitalocean/netbox/issues/2857) - Add `display_name` to DeviceType API serializer; fix DeviceType list for bulk device edit
+* [#2864](https://github.com/digitalocean/netbox/issues/2864) - Correct display of VRF name when no RD is assigned
 
 ---
 

+ 2 - 2
netbox/ipam/models.py

@@ -81,9 +81,9 @@ class VRF(ChangeLoggedModel, CustomFieldModel):
 
     @property
     def display_name(self):
-        if self.name and self.rd:
+        if self.rd:
             return "{} ({})".format(self.name, self.rd)
-        return None
+        return self.name
 
 
 class RIR(ChangeLoggedModel):