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

Allow unassigning VRF and tenants when editing objects in bulk

This commit is contained in:
Jeremy Stretch
2016-07-28 15:59:49 -04:00
parent 6b41794e12
commit 397943b222
7 changed files with 70 additions and 41 deletions

View File

@ -8,6 +8,18 @@ from utilities.forms import (
from .models import Tenant, TenantGroup
def bulkedit_tenant_choices():
"""
Include an option to remove the currently assigned Tenant from an object.
"""
choices = [
(None, '---------'),
(0, 'None'),
]
choices += [(t.pk, t.name) for t in Tenant.objects.all()]
return choices
#
# Tenant groups
#