diff --git a/yuthon_holiday/wizard/leave_allocation_wizard.py b/yuthon_holiday/wizard/leave_allocation_wizard.py index 6246597ea..c3c9e12ab 100644 --- a/yuthon_holiday/wizard/leave_allocation_wizard.py +++ b/yuthon_holiday/wizard/leave_allocation_wizard.py @@ -24,7 +24,7 @@ class LeaveAllocationWizard(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.salary_import(row)