Explorar el Código

Fixes #937: Region assignment should be optional when creating a site

Jeremy Stretch hace 9 años
padre
commit
06cafb09b3
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      netbox/dcim/forms.py

+ 1 - 1
netbox/dcim/forms.py

@@ -82,7 +82,7 @@ class RegionForm(BootstrapMixin, forms.ModelForm):
 #
 
 class SiteForm(BootstrapMixin, CustomFieldForm):
-    region = TreeNodeChoiceField(queryset=Region.objects.all())
+    region = TreeNodeChoiceField(queryset=Region.objects.all(), required=False)
     slug = SlugField()
     comments = CommentField()