fix: work_start_time 对光子的兼容

This commit is contained in:
caoqianming 2025-10-11 10:28:07 +08:00
parent eb2deb02c2
commit 20604ef7cb
1 changed files with 4 additions and 1 deletions

View File

@ -644,7 +644,10 @@ class MlogSerializer(CustomModelSerializer):
raise ParseError('缺少生产日期') raise ParseError('缺少生产日期')
if mtask and mtask.start_date == mtask.end_date: if mtask and mtask.start_date == mtask.end_date:
if attrs['handle_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) handle_user = attrs.get('handle_user', None)
if handle_user is None and hasattr(self, "request"): if handle_user is None and hasattr(self, "request"):