File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 77
88### Enhancements
99
10+ * [ #5143 ] ( https://github.com/netbox-community/netbox/issues/5143 ) - Include a device's asset tag in its display value
1011* [ #7619 ] ( https://github.com/netbox-community/netbox/issues/7619 ) - Permit custom validation rules to be defined as plain data or dotted path to class
1112* [ #7761 ] ( https://github.com/netbox-community/netbox/issues/7761 ) - Extend cable tracing across bridged interfaces
1213* [ #7769 ] ( https://github.com/netbox-community/netbox/issues/7769 ) - Enable assignment of IP addresses to an existing FHRP group
2526
2627### REST API Changes
2728
29+ * dcim.Device
30+ * The ` display ` field now includes the device's asset tag, if set
2831* extras.ImageAttachment
2932 * Added the ` last_updated ` field
3033
Original file line number Diff line number Diff line change @@ -604,7 +604,9 @@ class Meta:
604604 )
605605
606606 def __str__ (self ):
607- if self .name :
607+ if self .name and self .asset_tag :
608+ return f'{ self .name } ({ self .asset_tag } )'
609+ elif self .name :
608610 return self .name
609611 elif self .virtual_chassis :
610612 return f'{ self .virtual_chassis .name } :{ self .vc_position } ({ self .pk } )'
You can’t perform that action at this time.
0 commit comments