Skip to content

Commit 02f8839

Browse files
mabeziMarkus Ziehe
authored andcommitted
Fix regex pattern for character conversion
1 parent 42721ed commit 02f8839

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
bugfixes:
3+
- Fixed regex pattern for character conversion when using slug parameter in multiple modules

plugins/module_utils/netbox_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1425,7 +1425,7 @@ def _to_slug(self, value):
14251425
return value
14261426
else:
14271427
removed_chars = re.sub(r"[^\-\.\w\s]", "", value)
1428-
convert_chars = re.sub(r"[\-\.\s]+", "-", removed_chars)
1428+
convert_chars = re.sub(r"[\-\.\s]", "-", removed_chars)
14291429
return convert_chars.strip().lower()
14301430

14311431
def _normalize_data(self, data):

0 commit comments

Comments
 (0)