perf: 账号收集添加资产名称模糊搜索 (#12673)

Co-authored-by: feng <1304903146@qq.com>
pull/12677/head
fit2bot 2024-02-20 18:42:11 +08:00 committed by GitHub
parent 135fb7c6f9
commit c21ca70158
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -52,6 +52,7 @@ class AccountFilterSet(BaseFilterSet):
class GatheredAccountFilterSet(BaseFilterSet):
node_id = drf_filters.CharFilter(method='filter_nodes')
asset_id = drf_filters.CharFilter(field_name='asset_id', lookup_expr='exact')
asset_name = drf_filters.CharFilter(field_name='asset__name', lookup_expr='icontains')
@staticmethod
def filter_nodes(queryset, name, value):