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

Store empty names as null

This commit is contained in:
Jeremy Stretch
2020-02-07 12:24:38 -05:00
parent c72a353733
commit dc1b7874ff
3 changed files with 11 additions and 7 deletions

View File

@ -21,7 +21,7 @@ def naturalize(value, max_length=None, integer_places=8):
:param integer_places: The number of places to which each integer will be expanded. (Default: 8)
"""
if not value:
return ''
return value
output = []
for segment in re.split(r'(\d+)', value):
if segment.isdigit():