From 81e97c4789e0b5444d949be842910d22e4454b08 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 30 Nov 2023 14:48:47 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=97=A5=E5=BF=97=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/services.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/wpm/services.py b/apps/wpm/services.py index a09eeed8..b066a1a2 100644 --- a/apps/wpm/services.py +++ b/apps/wpm/services.py @@ -144,6 +144,8 @@ def mlog_submit(mlog: Mlog, user: User, now: Union[datetime.datetime, None]): return if now is None: now = timezone.now() + if now.date() < mlog.handle_date: + raise ParseError('不可提交未来的日志') belong_dept = mlog.mgroup.belong_dept material_out = mlog.material_out material_in = mlog.material_in