mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Convert remaining DCIM models to use NaturalOrderingField
This commit is contained in:
@ -20,6 +20,8 @@ def naturalize(value, max_length=None, integer_places=8):
|
||||
:param max_length: The maximum length of the returned string. Characters beyond this length will be stripped.
|
||||
:param integer_places: The number of places to which each integer will be expanded. (Default: 8)
|
||||
"""
|
||||
if not value:
|
||||
return ''
|
||||
output = []
|
||||
for segment in re.split(r'(\d+)', value):
|
||||
if segment.isdigit():
|
||||
|
Reference in New Issue
Block a user