diff --git a/yuthon_hr_attendance/models/yuthon_shift_planning.py b/yuthon_hr_attendance/models/yuthon_shift_planning.py index d02234fad..a24cc292d 100644 --- a/yuthon_hr_attendance/models/yuthon_shift_planning.py +++ b/yuthon_hr_attendance/models/yuthon_shift_planning.py @@ -86,7 +86,7 @@ class YuthonShiftPlanning(models.Model): pass # 跳过休息日 else: if current_date.day == 31: - self.create_planning_slot(record, role_a, role[role_index-1], current_date) + self.create_planning_slot(record, role_a, role[role_index-2], current_date) else: self.create_planning_slot(record, role_a, role[role_index], current_date) current_date += timedelta(days=1)