fix: work_start_time 可不填2
This commit is contained in:
parent
f5f6c136d9
commit
eb2deb02c2
|
@ -152,7 +152,7 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]):
|
||||||
"""
|
"""
|
||||||
生产日志提交后需要执行的操作
|
生产日志提交后需要执行的操作
|
||||||
"""
|
"""
|
||||||
if mlog.work_end_time and mlog.work_start_time > timezone.now():
|
if mlog.work_start_time and mlog.work_start_time > timezone.now():
|
||||||
raise ParseError('操作开始时间不能晚于当前时间')
|
raise ParseError('操作开始时间不能晚于当前时间')
|
||||||
if mlog.work_start_time and mlog.work_end_time and mlog.work_end_time < mlog.work_start_time:
|
if mlog.work_start_time and mlog.work_end_time and mlog.work_end_time < mlog.work_start_time:
|
||||||
raise ParseError('操作结束时间不能早于操作开始时间')
|
raise ParseError('操作结束时间不能早于操作开始时间')
|
||||||
|
|
Loading…
Reference in New Issue