1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #4336: Ensure interfaces without a subinterface ID are ordered before subinterface zero

This commit is contained in:
Jeremy Stretch
2020-04-21 16:13:34 -04:00
parent ada55dfdfb
commit 131d2c97ca
7 changed files with 56 additions and 18 deletions

View File

@@ -75,7 +75,7 @@ def naturalize_interface(value, max_length):
if part is not None:
output += part.rjust(6, '0')
else:
output += '000000'
output += '......'
# Finally, naturalize any remaining text and append it
if match.group('remainder') is not None and len(output) < max_length: