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

Closes #6874: Add tenant assignment for locations

This commit is contained in:
jeremystretch
2021-10-07 15:46:21 -04:00
parent 18c3bb673f
commit 5a6190e321
11 changed files with 82 additions and 19 deletions

View File

@@ -120,10 +120,16 @@ class LocationCSVForm(CustomFieldModelCSVForm):
'invalid_choice': 'Location not found.',
}
)
tenant = CSVModelChoiceField(
queryset=Tenant.objects.all(),
required=False,
to_field_name='name',
help_text='Assigned tenant'
)
class Meta:
model = Location
fields = ('site', 'parent', 'name', 'slug', 'description')
fields = ('site', 'parent', 'name', 'slug', 'tenant', 'description')
class RackRoleCSVForm(CustomFieldModelCSVForm):