mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-21 19:47:20 -06:00
Revert REST API changes from #8284
This commit is contained in:
parent
f1472d218e
commit
e84a282aa6
@ -4,12 +4,12 @@
|
||||
|
||||
### Enhancements
|
||||
|
||||
* [#8262](https://github.com/netbox-community/netbox/issues/8262) - Add cables to tenant stats
|
||||
* [#8265](https://github.com/netbox-community/netbox/issues/8265) - Add newer Stackwise-n interface types
|
||||
* [#8262](https://github.com/netbox-community/netbox/issues/8262) - Add cable count to tenant stats
|
||||
* [#8265](https://github.com/netbox-community/netbox/issues/8265) - Add Stackwise-n interface types
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* [#8287](https://github.com/netbox-community/netbox/issues/8287) - Correct label in Export Template Form
|
||||
* [#8287](https://github.com/netbox-community/netbox/issues/8287) - Correct label in export template form
|
||||
|
||||
---
|
||||
|
||||
|
@ -40,14 +40,13 @@ class TenantSerializer(PrimaryModelSerializer):
|
||||
vlan_count = serializers.IntegerField(read_only=True)
|
||||
vrf_count = serializers.IntegerField(read_only=True)
|
||||
cluster_count = serializers.IntegerField(read_only=True)
|
||||
cable_count = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = Tenant
|
||||
fields = [
|
||||
'id', 'url', 'display', 'name', 'slug', 'group', 'description', 'comments', 'tags', 'custom_fields',
|
||||
'created', 'last_updated', 'circuit_count', 'device_count', 'ipaddress_count', 'prefix_count', 'rack_count',
|
||||
'site_count', 'virtualmachine_count', 'vlan_count', 'vrf_count', 'cluster_count', 'cable_count',
|
||||
'site_count', 'virtualmachine_count', 'vlan_count', 'vrf_count', 'cluster_count',
|
||||
]
|
||||
|
||||
|
||||
|
@ -47,8 +47,7 @@ class TenantViewSet(CustomFieldModelViewSet):
|
||||
site_count=count_related(Site, 'tenant'),
|
||||
virtualmachine_count=count_related(VirtualMachine, 'tenant'),
|
||||
vlan_count=count_related(VLAN, 'tenant'),
|
||||
vrf_count=count_related(VRF, 'tenant'),
|
||||
cable_count=count_related(Cable, 'tenant')
|
||||
vrf_count=count_related(VRF, 'tenant')
|
||||
)
|
||||
serializer_class = serializers.TenantSerializer
|
||||
filterset_class = filtersets.TenantFilterSet
|
||||
|
Loading…
Reference in New Issue
Block a user