From 20604ef7cbf5d2757589a67dc5ccc35f01d2c798 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sat, 11 Oct 2025 10:28:07 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20work=5Fstart=5Ftime=20=E5=AF=B9=E5=85=89?= =?UTF-8?q?=E5=AD=90=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index cd9f63fe..09458f32 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -644,7 +644,10 @@ class MlogSerializer(CustomModelSerializer): raise ParseError('缺少生产日期') if mtask and mtask.start_date == mtask.end_date: if attrs['handle_date'] != mtask.end_date: - raise ParseError('任务日期与生产日期不一致') + if work_start_time: + raise ParseError('任务日期与生产日期不一致') + else: + attrs['handle_date'] = mtask.end_date handle_user = attrs.get('handle_user', None) if handle_user is None and hasattr(self, "request"):