Skip to content

Commit 7222f98

Browse files
authored
#330 fix max_custom_object_types (#331)
1 parent 143e745 commit 7222f98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox_custom_objects/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def clean(self):
235235
# Enforce max number of COTs that may be created (max_custom_object_types)
236236
if not self.pk:
237237
max_cots = get_plugin_config("netbox_custom_objects", "max_custom_object_types")
238-
if max_cots and CustomObjectType.objects.count() > max_cots:
238+
if max_cots and CustomObjectType.objects.count() >= max_cots:
239239
raise ValidationError(_(
240240
f"Maximum number of Custom Object Types ({max_cots}) "
241241
"exceeded; adjust max_custom_object_types to raise this limit"

0 commit comments

Comments
 (0)