From 0eec5d40a17071454bc37f97f81ebcd30526a59e Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Mon, 11 Mar 2024 16:54:22 +0100 Subject: [PATCH] fix #185 no schema select --- idhub/admin/forms.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/idhub/admin/forms.py b/idhub/admin/forms.py index 3796969..a8ac0fa 100644 --- a/idhub/admin/forms.py +++ b/idhub/admin/forms.py @@ -217,13 +217,13 @@ class ImportForm(forms.Form): return data def clean_file_import(self): - props = self.json_schema.get("properties", {}) data = self.cleaned_data["file_import"] - self.file_name = data.name - if not self._schema: return data + self.file_name = data.name + props = self.json_schema.get("properties", {}) + # Forze than pandas read one column as string dtype_dict = {"phoneNumber": str} df = pd.read_excel(data, dtype=dtype_dict)