mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
perf: Account su_from 返回使用 ObjectRelatedField allow_null allow_empty
This commit is contained in:
@@ -59,7 +59,7 @@ class AccountSerializer(AccountSerializerCreateMixin, BaseAccountSerializer):
|
||||
label=_('Asset'), attrs=('id', 'name', 'address', 'platform_id')
|
||||
)
|
||||
su_from = ObjectRelatedField(
|
||||
required=False, queryset=Account.objects,
|
||||
required=False, queryset=Account.objects, allow_null=True, allow_empty=True,
|
||||
label=_('Account'), attrs=('id', 'name', 'username')
|
||||
)
|
||||
|
||||
|
Reference in New Issue
Block a user