Commit 165f57aa authored by ibuler's avatar ibuler

[Bugfix] 修复资产列表不统一的bug

parent f7e1cbcd
......@@ -28,7 +28,7 @@ class InteractiveServer:
self.client = client
self.request = client.request
self.assets = None
self.search_result = None
self._search_result = None
self.asset_groups = None
self.get_user_assets_async()
self.get_user_asset_groups_async()
......@@ -37,6 +37,18 @@ class InteractiveServer:
def app(self):
return self._app()
@property
def search_result(self):
if self._search_result:
return self._search_result
else:
return None
@search_result.setter
def search_result(self, value):
value = self.filter_system_users(value)
self._search_result = value
def display_banner(self):
self.client.send(char.CLEAR_CHAR)
logo_path = os.path.join(self.app.root_path, "logo.txt")
......@@ -225,8 +237,7 @@ class InteractiveServer:
return assets
def get_user_assets(self):
assets = self.app.service.get_user_assets(self.client.user)
self.assets = self.filter_system_users(assets)
self.assets = self.app.service.get_user_assets(self.client.user)
logger.debug("Get user {} assets total: {}".format(self.client.user, len(self.assets)))
def get_user_assets_async(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment