Location model cleanup

This commit is contained in:
jeremystretch
2021-04-05 11:04:12 -04:00
parent 4883bc3dd4
commit 7b8bd2d4ce
6 changed files with 34 additions and 14 deletions

View File

@@ -134,12 +134,13 @@ class LocationSerializer(NestedGroupModelSerializer):
site = NestedSiteSerializer()
parent = NestedLocationSerializer(required=False, allow_null=True)
rack_count = serializers.IntegerField(read_only=True)
device_count = serializers.IntegerField(read_only=True)
class Meta:
model = Location
fields = [
'id', 'url', 'display', 'name', 'slug', 'site', 'parent', 'description', 'custom_fields', 'created',
'last_updated', 'rack_count', '_depth',
'last_updated', 'rack_count', 'device_count', '_depth',
]