feat: MlogSerializer 处理 work_start_time 的 bug

This commit is contained in:
caoqianming 2025-09-02 11:09:12 +08:00
parent 81561b5238
commit 9af23216b6
1 changed files with 1 additions and 1 deletions

View File

@ -635,7 +635,7 @@ class MlogSerializer(CustomModelSerializer):
mgroup:Mgroup = attrs['mgroup']
work_start_time:datetime = attrs['work_start_time']
handle_date, attrs["shift"] = mgroup.get_shift(work_start_time)
if mtask.start_date == mtask.end_date:
if mtask and mtask.start_date == mtask.end_date:
attrs['handle_date'] = mtask.end_date
if attrs['handle_date'] != handle_date:
raise ParseError('任务日期与生产日期不一致')