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:
Jason Yates
2022-01-13 04:58:51 +00:00
parent 85f588e8c9
commit 62fc7717c8
3 changed files with 7 additions and 13 deletions

View File

@@ -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',