mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 15:11:27 +00:00
fix: 修复根据节点/资产查询授权时报错的问题
This commit is contained in:
committed by
Jiangjie.Bai
parent
88ea7ae149
commit
e838d974c3
@@ -143,7 +143,7 @@ class AssetPermissionFilter(PermissionBaseFilter):
|
||||
if not _nodes:
|
||||
return queryset.none()
|
||||
|
||||
node = _nodes.get()
|
||||
node = _nodes.first()
|
||||
|
||||
if not is_query_all:
|
||||
queryset = queryset.filter(nodes=node)
|
||||
@@ -170,7 +170,7 @@ class AssetPermissionFilter(PermissionBaseFilter):
|
||||
return queryset
|
||||
if not assets:
|
||||
return queryset.none()
|
||||
asset = assets.get()
|
||||
asset = assets.first()
|
||||
|
||||
if not is_query_all:
|
||||
queryset = queryset.filter(assets=asset)
|
||||
|
Reference in New Issue
Block a user