Skip to content

Commit 866b0e6

Browse files
authored
Fix super value in update user permissions (#948)
1 parent 5a49d20 commit 866b0e6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/admin/service/user_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ async def update_permission(*, db: AsyncSession, request: Request, pk: int, type
144144
raise errors.NotFoundError(msg='用户不存在')
145145
if pk == request.user.id:
146146
raise errors.ForbiddenError(msg='禁止修改自身权限')
147-
count = await user_dao.set_super(db, pk, is_super=not user.status)
147+
count = await user_dao.set_super(db, pk, is_super=not user.is_superuser)
148148
case UserPermissionType.staff:
149149
user = await user_dao.get(db, pk)
150150
if not user:

0 commit comments

Comments
 (0)