mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Implement support for nested TenantGroups
This commit is contained in:
@@ -12,11 +12,12 @@ from .nested_serializers import *
|
||||
#
|
||||
|
||||
class TenantGroupSerializer(ValidatedModelSerializer):
|
||||
parent = NestedTenantGroupSerializer(required=False, allow_null=True)
|
||||
tenant_count = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = TenantGroup
|
||||
fields = ['id', 'name', 'slug', 'tenant_count']
|
||||
fields = ['id', 'name', 'slug', 'parent', 'tenant_count']
|
||||
|
||||
|
||||
class TenantSerializer(TaggitSerializer, CustomFieldModelSerializer):
|
||||
|
Reference in New Issue
Block a user