Skip to content

Commit

Permalink
Fixes netbox-community#1239: Fix server error when creating VLANGroup…
Browse files Browse the repository at this point in the history
… via API
  • Loading branch information
jeremystretch committed May 31, 2017
1 parent 35c6983 commit a9e2ae3
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 a9e2ae3

Please sign in to comment.