fix excel with one line

This commit is contained in:
Cayo Puigdefabregas 2024-02-29 13:04:54 +01:00
parent b1b16f7697
commit c3358e73b7
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ class ImportForm(forms.Form):
if not data_pd: if not data_pd:
self.exception(_("This file is empty!")) self.exception(_("This file is empty!"))
if not df.last_valid_index(): if df.last_valid_index() is None:
self.exception(_("This file is badly formatted!")) self.exception(_("This file is badly formatted!"))
for n in range(df.last_valid_index()+1): for n in range(df.last_valid_index()+1):