feat: 去除 handle_date的日期校验
This commit is contained in:
parent
00853f395d
commit
0de377ddc4
|
|
@ -396,13 +396,13 @@ class MlogSerializer(CustomModelSerializer):
|
||||||
attrs['handle_date'] = attrs['work_end_time'].date()
|
attrs['handle_date'] = attrs['work_end_time'].date()
|
||||||
elif attrs['work_start_time']:
|
elif attrs['work_start_time']:
|
||||||
attrs['handle_date'] = attrs['work_start_time'].date()
|
attrs['handle_date'] = attrs['work_start_time'].date()
|
||||||
if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
# if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||||
pass
|
# pass
|
||||||
else:
|
# else:
|
||||||
if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
# if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||||
pass
|
# pass
|
||||||
else:
|
# else:
|
||||||
raise ValidationError('操作日期错误')
|
# raise ValidationError('操作日期错误')
|
||||||
return attrs
|
return attrs
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue