From 58841d57cea66958a7ed1370ee234c3f32e0e837 Mon Sep 17 00:00:00 2001 From: vapao Date: Wed, 4 Mar 2020 17:22:41 +0800 Subject: [PATCH] =?UTF-8?q?F=20=E4=BF=AE=E5=A4=8D=E5=B7=A5=E4=BD=9C?= =?UTF-8?q?=E5=8F=B0=E7=BB=9F=E8=AE=A1=E4=B8=BB=E6=9C=BA=E6=95=B0=E9=87=8F?= =?UTF-8?q?=E5=8F=AF=E8=83=BD=E4=B8=8D=E6=AD=A3=E7=A1=AE=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- spug_api/apps/home/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spug_api/apps/home/views.py b/spug_api/apps/home/views.py index 24564db..460f646 100644 --- a/spug_api/apps/home/views.py +++ b/spug_api/apps/home/views.py @@ -43,7 +43,7 @@ def get_request(request): def get_deploy(request): - host = Host.objects.count() + host = Host.objects.filter(deleted_at__isnull=True).count() data = {x.id: {'name': x.name, 'count': 0} for x in App.objects.all()} for dep in Deploy.objects.all(): data[dep.app_id]['count'] += len(json.loads(dep.host_ids))