提交 1090887b 编写于 作者: X xinwen 提交者: baltery

fix: 管理用户-> 资产用户列表 更新密码报错

上级 7c55d462
......@@ -57,7 +57,7 @@ class AuthBook(BaseUser):
同时设置自己的 is_latest=True, version=max_version + 1
"""
username = kwargs['username']
asset = kwargs['asset']
asset = kwargs.get('asset') or kwargs.get('asset_id')
with transaction.atomic():
# 使用select_for_update限制并发创建相同的username、asset条目
instances = cls.objects.select_for_update().filter(username=username, asset=asset)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册