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()
|
||||
elif attrs['work_start_time']:
|
||||
attrs['handle_date'] = attrs['work_start_time'].date()
|
||||
if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||
pass
|
||||
else:
|
||||
if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||
pass
|
||||
else:
|
||||
raise ValidationError('操作日期错误')
|
||||
# if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||
# pass
|
||||
# else:
|
||||
# if attrs['handle_date'] >= mtask.start_date and attrs['handle_date'] <= mtask.end_date:
|
||||
# pass
|
||||
# else:
|
||||
# raise ValidationError('操作日期错误')
|
||||
return attrs
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue