mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-28 08:06:27 +00:00
serializer优化&&授权导入优化
This commit is contained in:
committed by
Jiangjie.Bai
parent
fea0170c5e
commit
9a92e24e50
@@ -15,10 +15,15 @@ class LabelSerializer(BulkOrgResourceModelSerializer):
|
||||
|
||||
class Meta:
|
||||
model = Label
|
||||
fields = [
|
||||
'id', 'name', 'value', 'category', 'is_active', 'comment',
|
||||
'date_created', 'asset_count', 'assets', 'category_display'
|
||||
fields_mini = ['id', 'name']
|
||||
fields_small = fields_mini + [
|
||||
'value', 'category', 'category_display',
|
||||
'is_active',
|
||||
'date_created',
|
||||
'comment',
|
||||
]
|
||||
fields_m2m = ['asset_count', 'assets']
|
||||
fields = fields_small + fields_m2m
|
||||
read_only_fields = (
|
||||
'category', 'date_created', 'asset_count',
|
||||
)
|
||||
|
Reference in New Issue
Block a user