fix: authbook load asset queryset bug

pull/7539/head
feng626 2022-01-20 10:56:49 +08:00 committed by Jiangjie.Bai
parent 9e47bf6ec5
commit 46270fd91c
1 changed files with 2 additions and 2 deletions

View File

@ -151,9 +151,9 @@ class AuthMixin:
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)
)
))
if len(authbooks) == 0:
return None
elif len(authbooks) == 1: