Skip to content

Commit e48d532

Browse files
committed
Fix regex pattern for character conversion
1 parent d32fa03 commit e48d532

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
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
@@ -1426,7 +1426,7 @@ def _to_slug(self, value):
14261426
return value
14271427
else:
14281428
removed_chars = re.sub(r"[^\-\.\w\s]", "", value)
1429-
convert_chars = re.sub(r"[\-\.\s]+", "-", removed_chars)
1429+
convert_chars = re.sub(r"[\-\.\s]", "-", removed_chars)
14301430
return convert_chars.strip().lower()
14311431

14321432
def _normalize_data(self, data):

0 commit comments

Comments
 (0)