From 75f4f6d0a29f1ee883b9279546f27277206087eb Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 19 May 2020 20:50:33 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E8=B5=84=E4=BA=A7=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E5=BA=8F=E5=88=97=E7=B1=BBis=5Fexpired,=20is=5Fvalid=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=BAread=5Fonly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/perms/serializers/asset_permission.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/perms/serializers/asset_permission.py b/apps/perms/serializers/asset_permission.py index aa4b51cb2..757fe2853 100644 --- a/apps/perms/serializers/asset_permission.py +++ b/apps/perms/serializers/asset_permission.py @@ -36,14 +36,14 @@ class ActionsDisplayField(ActionsField): class AssetPermissionSerializer(BulkOrgResourceModelSerializer): actions = ActionsField(required=False, allow_null=True) - is_valid = serializers.BooleanField() - is_expired = serializers.BooleanField() + is_valid = serializers.BooleanField(read_only=True) + is_expired = serializers.BooleanField(read_only=True) class Meta: model = AssetPermission mini_fields = ['id', 'name'] small_fields = mini_fields + [ - 'is_active', 'actions', 'created_by', 'date_created' + 'is_active', 'is_expired', 'is_valid', 'actions', 'created_by', 'date_created' ] m2m_fields = [ 'users', 'user_groups', 'assets', 'nodes', 'system_users',