From f03a378ce0f438b6228d7fc52a5271dd19c6fe27 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 31 May 2017 11:50:03 -0400 Subject: [PATCH] Fixes #1239: Fix server error when creating VLANGroup via API --- netbox/ipam/api/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/ipam/api/serializers.py b/netbox/ipam/api/serializers.py index 096f1d23271..f4493719f96 100644 --- a/netbox/ipam/api/serializers.py +++ b/netbox/ipam/api/serializers.py @@ -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)