Skip to content

Commit

Permalink
Fixes #1239: Fix server error when creating VLANGroup via API
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed May 31, 2017
1 parent 6aae8ae commit f03a378
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion netbox/ipam/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def validate(self, data):
# Validate uniqueness of name and slug if a site has been assigned.
if data.get('site', None):
for field in ['name', 'slug']:
validator = UniqueTogetherValidator(queryset=VLAN.objects.all(), fields=('site', field))
validator = UniqueTogetherValidator(queryset=VLANGroup.objects.all(), fields=('site', field))
validator.set_context(self)
validator(data)

Expand Down

0 comments on commit f03a378

Please sign in to comment.