mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-02 07:55:16 +00:00
Merge pull request #12323 from jumpserver/pr@dev@gather_account
fix: 收集账号过滤asset_id 失败
This commit is contained in:
@@ -51,6 +51,7 @@ class AccountFilterSet(BaseFilterSet):
|
|||||||
|
|
||||||
class GatheredAccountFilterSet(BaseFilterSet):
|
class GatheredAccountFilterSet(BaseFilterSet):
|
||||||
node_id = drf_filters.CharFilter(method='filter_nodes')
|
node_id = drf_filters.CharFilter(method='filter_nodes')
|
||||||
|
asset_id = drf_filters.CharFilter(field_name='asset_id', lookup_expr='exact')
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def filter_nodes(queryset, name, value):
|
def filter_nodes(queryset, name, value):
|
||||||
@@ -58,4 +59,4 @@ class GatheredAccountFilterSet(BaseFilterSet):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
model = GatheredAccount
|
model = GatheredAccount
|
||||||
fields = ['id', 'asset_id', 'username']
|
fields = ['id', 'username']
|
||||||
|
Reference in New Issue
Block a user