mirror of
https://github.com/netbox-community/netbox.git
synced 2025-12-20 20:32:25 -06:00
Suggested changes
* Updating asdot computation to use an fstring * Cleaning code. Custom property now returns either the ASN with ASDOT notation or just the ASN. asn_with_asdot can now be referenced in ASNTable & objet template.
This commit is contained in:
@@ -108,10 +108,7 @@ class ASNTable(BaseTable):
|
||||
)
|
||||
|
||||
def render_asn(self, value, record):
|
||||
if record.asdot_notation:
|
||||
return f'{value} ({record.asdot_notation})'
|
||||
else:
|
||||
return value
|
||||
return record.asn_with_asdot
|
||||
|
||||
site_count = LinkedCountColumn(
|
||||
viewname='dcim:site_list',
|
||||
|
||||
Reference in New Issue
Block a user