fix: 修复用户绑定角色重大bug

This commit is contained in:
feng626
2022-03-22 16:14:25 +08:00
committed by 老广
parent d01d44b48d
commit 2ec0cb8a2c
2 changed files with 4 additions and 2 deletions

View File

@@ -49,6 +49,8 @@ class RolesSerializerMixin(serializers.Serializer):
return fields
action = view.action or 'list'
if action in ('partial_bulk_update', 'bulk_update', 'partial_update', 'update'):
action = 'create'
model_cls_field_mapper = {
SystemRoleBinding: ['system_roles', 'system_roles_display'],
OrgRoleBinding: ['org_roles', 'system_roles_display']