From 73b111cecf8a94f285d369f4773a53460ec246ce Mon Sep 17 00:00:00 2001 From: zhou <123@> Date: Wed, 19 Mar 2025 18:06:30 +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_holiday/wizard/yuthon_leave_wizard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yuthon_holiday/wizard/yuthon_leave_wizard.py b/yuthon_holiday/wizard/yuthon_leave_wizard.py index 259cfb37b..c839f3afc 100644 --- a/yuthon_holiday/wizard/yuthon_leave_wizard.py +++ b/yuthon_holiday/wizard/yuthon_leave_wizard.py @@ -24,7 +24,7 @@ class YuthonLeaveWizard(models.Model): raise ValidationError('请上传文件。') book = xlrd.open_workbook(file_contents=base64.decodebytes(self.excel_file)) sh = book.sheet_by_index(0) - for rx in range(1,2): + for rx in range(1, sh.nrows): row = sh.row(rx) self.leave_import(row)