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:
@ -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
|
||||
#
|
||||
|
Reference in New Issue
Block a user