mirror of https://github.com/jumpserver/jumpserver
[Update] 修改获取禁用资产的问题 (#2901)
parent
033b44f9d2
commit
6330f2d42d
|
@ -493,7 +493,7 @@ class AssetPermissionUtil(AssetPermissionCacheMixin):
|
||||||
pattern.add(r'^{0}$|^{0}:'.format(node.key))
|
pattern.add(r'^{0}$|^{0}:'.format(node.key))
|
||||||
pattern = '|'.join(list(pattern))
|
pattern = '|'.join(list(pattern))
|
||||||
if pattern:
|
if pattern:
|
||||||
assets = Asset.objects.filter(nodes__key__regex=pattern) \
|
assets = Asset.objects.filter(nodes__key__regex=pattern).valid() \
|
||||||
.prefetch_related('nodes')\
|
.prefetch_related('nodes')\
|
||||||
.only(*self.assets_only)\
|
.only(*self.assets_only)\
|
||||||
.distinct()
|
.distinct()
|
||||||
|
|
Loading…
Reference in New Issue