From 30f37d9ebfa8c834931b08b2f7d68d99fdf8602a Mon Sep 17 00:00:00 2001 From: Eric Date: Thu, 17 Nov 2022 16:38:46 +0800 Subject: [PATCH] perf: deployment task log order by date --- apps/terminal/models/applet/host.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/terminal/models/applet/host.py b/apps/terminal/models/applet/host.py index 83d9e3a41..020c4d98a 100644 --- a/apps/terminal/models/applet/host.py +++ b/apps/terminal/models/applet/host.py @@ -107,6 +107,9 @@ class AppletHostDeployment(JMSBaseModel): comment = models.TextField(default='', blank=True, verbose_name=_('Comment')) task = models.UUIDField(null=True, verbose_name=_('Task')) + class Meta: + ordering = ('-date_start',) + def start(self, **kwargs): from ...automations.deploy_applet_host import DeployAppletHostManager manager = DeployAppletHostManager(self)