mirror of https://github.com/jumpserver/jumpserver
fix: authbook load asset queryset bug
parent
9e47bf6ec5
commit
46270fd91c
|
@ -151,9 +151,9 @@ class AuthMixin:
|
||||||
def load_asset_special_auth(self, asset, username=''):
|
def load_asset_special_auth(self, asset, username=''):
|
||||||
"""
|
"""
|
||||||
"""
|
"""
|
||||||
authbooks = AuthBook.objects.filter(asset=asset).filter(
|
authbooks = list(AuthBook.objects.filter(asset=asset).filter(
|
||||||
Q(username=username) | Q(systemuser=self)
|
Q(username=username) | Q(systemuser=self)
|
||||||
)
|
))
|
||||||
if len(authbooks) == 0:
|
if len(authbooks) == 0:
|
||||||
return None
|
return None
|
||||||
elif len(authbooks) == 1:
|
elif len(authbooks) == 1:
|
||||||
|
|
Loading…
Reference in New Issue