feat: MlogSerializer 处理 work_start_time 的 bug
This commit is contained in:
parent
81561b5238
commit
9af23216b6
|
@ -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('任务日期与生产日期不一致')
|
||||
|
|
Loading…
Reference in New Issue