From bc9a098cc8efe25b131aea829d4a467bbead3c29 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 3 Sep 2024 14:51:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20mtask=5Fsubmit=20=E6=A0=A1=E9=AA=8C?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E6=9C=89=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/pm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/pm/services.py b/apps/pm/services.py index a049102c..fabdfc30 100644 --- a/apps/pm/services.py +++ b/apps/pm/services.py @@ -311,6 +311,8 @@ class PmService: now = timezone.now() if mtask.state == Mtask.MTASK_ASSGINED: mlogs = Mlog.objects.filter(mtask=mtask)|Mlog.objects.filter(b_mlog__mtask=mtask) + if not mlogs.exists(): + raise ParseError('该任务没有日志') if mlogs.filter(submit_time__isnull=True).exists(): raise ParseError('存在未提交的日志') mtask.state = Mtask.MTASK_SUBMIT