From f64687acd7a264e6544dd0d996bb357fb94aead9 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 26 Feb 2024 17:12:32 +0100 Subject: [PATCH] file empty --- idhub/admin/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/idhub/admin/forms.py b/idhub/admin/forms.py index 6c5d49c..26bbf5d 100644 --- a/idhub/admin/forms.py +++ b/idhub/admin/forms.py @@ -225,7 +225,7 @@ class ImportForm(forms.Form): data_pd = df.fillna('').to_dict() - if not data_pd: + if not data_pd or not df.last_valid_index(): self.exception("This file is empty!") if not self._schema: