mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-28 08:06:27 +00:00
[Bugfix] 修复资产数量不对的bug
This commit is contained in:
@@ -68,7 +68,7 @@ class NodeSerializer(serializers.ModelSerializer):
|
||||
|
||||
@staticmethod
|
||||
def get_assets_amount(obj):
|
||||
return obj.assets__count if hasattr(obj, 'assets__count') else 0
|
||||
return obj.get_all_assets().count()
|
||||
|
||||
@staticmethod
|
||||
def get_tree_id(obj):
|
||||
|
Reference in New Issue
Block a user