Fixes #1334: Fix server error when adding an interface to a device

This commit is contained in:
Jeremy Stretch
2017-07-11 14:52:50 -04:00
parent a4820a041b
commit b6c50c98b6
4 changed files with 6 additions and 6 deletions

View File

@@ -102,7 +102,7 @@ class TenancyForm(ChainedFieldsMixin, forms.Form):
# Initialize helper selector
instance = kwargs.get('instance')
if instance and instance.tenant is not None:
initial = kwargs.get('initial', {})
initial = kwargs.get('initial', {}).copy()
initial['tenant_group'] = instance.tenant.group
kwargs['initial'] = initial