From 2e3184cbd646e43b50e94c0c89e7f97312bea389 Mon Sep 17 00:00:00 2001 From: Bai Date: Fri, 8 Dec 2023 16:16:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Endpoint=20?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/models/component/endpoint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/terminal/models/component/endpoint.py b/apps/terminal/models/component/endpoint.py index 8e73bb17d..eb080dc99 100644 --- a/apps/terminal/models/component/endpoint.py +++ b/apps/terminal/models/component/endpoint.py @@ -81,10 +81,10 @@ class Endpoint(JMSBaseModel): instance = instance.get_asset() if not isinstance(instance, Asset): return None - values = instance.labels.filter(name='endpoint').values_list('value', flat=True) + values = instance.labels.filter(label__name='endpoint').values_list('label__value', flat=True) if not values: return None - endpoints = cls.objects.filter(name__in=values).order_by('-date_updated') + endpoints = cls.objects.filter(name__in=list(values)).order_by('-date_updated') for endpoint in endpoints: if endpoint.is_valid_for(instance, protocol): return endpoint