From 0de377ddc4f97c9b338c408e7c52babcae23456f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 5 Sep 2024 09:35:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=20handle=5Fdate?= =?UTF-8?q?=E7=9A=84=E6=97=A5=E6=9C=9F=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wpm/serializers.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/wpm/serializers.py b/apps/wpm/serializers.py index c6b9e548..0b0f1504 100644 --- a/apps/wpm/serializers.py +++ b/apps/wpm/serializers.py @@ -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