From 3425ab78068c87cc757914ef5bd25b381c4b4b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=B9=8F=E5=AE=87?= <9664676+pengyuthon@user.noreply.gitee.com> Date: Mon, 9 Mar 2026 20:32:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yuthon_hr_attendance/models/yuthon_shift_approval.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/yuthon_hr_attendance/models/yuthon_shift_approval.py b/yuthon_hr_attendance/models/yuthon_shift_approval.py index e54ac70e3..1f63a7fd5 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_approval.py +++ b/yuthon_hr_attendance/models/yuthon_shift_approval.py @@ -75,10 +75,9 @@ class YuthonShiftApproval(models.Model): if self.shift_two_date and self.resource_id: slot = self._get_slot(self.resource_id.id, self.shift_two_date) if not slot: - if not slot: - self.shift_two_rest = '休息' - else: - self.shift_two_rest = None + self.shift_two_rest = '休息' + else: + self.shift_two_rest = None self.shift_two_id = slot else: self.shift_two_id = False