Skip to content

Commit

Permalink
Fixes #11816: Detach group/site validation error from group field
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Dec 27, 2023
1 parent 031b754 commit 03ebed9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions netbox/ipam/models/vlans.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,11 +224,11 @@ def clean(self):

# Validate VLAN group (if assigned)
if self.group and self.site and self.group.scope != self.site:
raise ValidationError({
'group': _(
raise ValidationError(
_(
"VLAN is assigned to group {group} (scope: {scope}); cannot also assign to site {site}."
).format(group=self.group, scope=self.group.scope, site=self.site)
})
)

# Validate group min/max VIDs
if self.group and not self.group.min_vid <= self.vid <= self.group.max_vid:
Expand Down

0 comments on commit 03ebed9

Please sign in to comment.