Skip to content

Commit e6642b5

Browse files
committed
Fixes #11816: Detach group/site validation error from group field
1 parent a67236f commit e6642b5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

netbox/ipam/models/vlans.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,11 @@ def clean(self):
224224

225225
# Validate VLAN group (if assigned)
226226
if self.group and self.site and self.group.scope != self.site:
227-
raise ValidationError({
228-
'group': _(
227+
raise ValidationError(
228+
_(
229229
"VLAN is assigned to group {group} (scope: {scope}); cannot also assign to site {site}."
230230
).format(group=self.group, scope=self.group.scope, site=self.site)
231-
})
231+
)
232232

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

0 commit comments

Comments
 (0)