Skip to content

Commit d6bde32

Browse files
committed
Simplify help text replacement string for component forms with 'module' field
1 parent ba7dbcf commit d6bde32

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

netbox/dcim/forms/object_create.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ def __init__(self, *args, **kwargs):
5757

5858
# Components attached to a module need to present this standardized substitution help text.
5959
if 'module' in self.fields:
60-
help_text_parts = []
61-
if self.fields['name'].help_text:
62-
help_text_parts.append(self.fields['name'].help_text)
63-
help_text_parts.append(_(
64-
"The string <code>{module}</code> will be replaced with the position of the assigned module, if any."
65-
))
66-
self.fields['name'].help_text = ' '.join([str(x) for x in help_text_parts])
60+
self.fields['name'].help_text = _(
61+
"Alphanumeric ranges are supported for bulk creation. Mixed cases and types within a single range are "
62+
"not supported (example: <code>[ge,xe]-0/0/[0-9]</code>). The string <code>{module}</code> will be "
63+
"replaced with the position of the assigned module, if any."
64+
)
6765

6866
def clean(self):
6967
super().clean()

0 commit comments

Comments
 (0)