mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 16:51:11 +03:00
exclude created/modified from RoleSerializer
This commit is contained in:
parent
8c3b1c06d9
commit
19c3e26cf2
@ -2261,6 +2261,7 @@ class RoleSerializer(BaseSerializer):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Role
|
model = Role
|
||||||
|
fields = ('*', '-created', '-modified')
|
||||||
read_only_fields = ('id', 'role_field', 'description', 'name')
|
read_only_fields = ('id', 'role_field', 'description', 'name')
|
||||||
|
|
||||||
def to_representation(self, obj):
|
def to_representation(self, obj):
|
||||||
@ -2276,8 +2277,6 @@ class RoleSerializer(BaseSerializer):
|
|||||||
ret['summary_fields']['resource_type'] = get_type_for_model(content_model)
|
ret['summary_fields']['resource_type'] = get_type_for_model(content_model)
|
||||||
ret['summary_fields']['resource_type_display_name'] = content_model._meta.verbose_name.title()
|
ret['summary_fields']['resource_type_display_name'] = content_model._meta.verbose_name.title()
|
||||||
|
|
||||||
ret.pop('created')
|
|
||||||
ret.pop('modified')
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def get_related(self, obj):
|
def get_related(self, obj):
|
||||||
|
Loading…
Reference in New Issue
Block a user