1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #1229: Fix validation error on forms where API search is used

This commit is contained in:
Jeremy Stretch
2017-05-25 14:33:50 -04:00
parent ebddc46bc0
commit 1dd5e2c926
12 changed files with 173 additions and 118 deletions

View File

@ -81,7 +81,9 @@ class TenancyForm(ChainedFieldsMixin, forms.Form):
)
tenant = ChainedModelChoiceField(
queryset=Tenant.objects.all(),
chains={'group': 'tenant_group'},
chains=(
('group', 'tenant_group'),
),
required=False,
widget=APISelect(
api_url='/api/tenancy/tenants/?group_id={{tenant_group}}'