mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
Added child counts to API serializers (WIP)
This commit is contained in:
@ -10,7 +10,8 @@ __all__ = [
|
||||
|
||||
class NestedSecretRoleSerializer(WritableNestedSerializer):
|
||||
url = serializers.HyperlinkedIdentityField(view_name='secrets-api:secretrole-detail')
|
||||
secret_count = serializers.IntegerField(read_only=True)
|
||||
|
||||
class Meta:
|
||||
model = SecretRole
|
||||
fields = ['id', 'url', 'name', 'slug']
|
||||
fields = ['id', 'url', 'name', 'slug', 'secret_count']
|
||||
|
Reference in New Issue
Block a user