You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
('name', models.CharField(max_length=100, unique=True, validators=[django.core.validators.RegexValidator(message='Only lowercase alphanumeric characters and underscores are allowed.', regex='^[a-z0-9_]+$'), django.core.validators.RegexValidator(flags=re.RegexFlag['IGNORECASE'], inverse_match=True, message='Double underscores are not permitted in custom object object type names.', regex='__')])),
48
+
('name', models.CharField(
49
+
max_length=100,
50
+
unique=True,
51
+
validators=[
52
+
django.core.validators.RegexValidator(
53
+
message='Only lowercase alphanumeric characters and underscores are allowed.',
54
+
regex='^[a-z0-9_]+$',
55
+
),
56
+
django.core.validators.RegexValidator(
57
+
flags=re.RegexFlag['IGNORECASE'],
58
+
inverse_match=True,
59
+
message='Double underscores are not permitted in custom object object type names.',
('name', models.CharField(max_length=50, validators=[django.core.validators.RegexValidator(flags=re.RegexFlag['IGNORECASE'], message='Only alphanumeric characters and underscores are allowed.', regex='^[a-z0-9_]+$'), django.core.validators.RegexValidator(flags=re.RegexFlag['IGNORECASE'], inverse_match=True, message='Double underscores are not permitted in custom object field names.', regex='__')])),
92
+
('name', models.CharField(
93
+
max_length=50,
94
+
validators=[
95
+
django.core.validators.RegexValidator(
96
+
flags=re.RegexFlag['IGNORECASE'],
97
+
message='Only alphanumeric characters and underscores are allowed.',
98
+
regex='^[a-z0-9_]+$',
99
+
),
100
+
django.core.validators.RegexValidator(
101
+
flags=re.RegexFlag['IGNORECASE'],
102
+
inverse_match=True,
103
+
message='Double underscores are not permitted in custom object field names.',
@@ -94,10 +154,17 @@ class Migration(migrations.Migration):
94
154
),
95
155
migrations.AddConstraint(
96
156
model_name='customobjecttype',
97
-
constraint=models.UniqueConstraint(django.db.models.functions.text.Lower('name'), name='netbox_custom_objects_customobjecttype_name', violation_error_message='A Custom Object Type with this name already exists.'),
0 commit comments