From 0ed523ca5c92bfd3ed31afcba86c8f6a2ea0a043 Mon Sep 17 00:00:00 2001 From: Cayo Puigdefabregas Date: Wed, 14 Sep 2022 15:43:34 +0200 Subject: [PATCH] add Ods File as description in Placeholders Log --- ereuse_devicehub/inventory/forms.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ereuse_devicehub/inventory/forms.py b/ereuse_devicehub/inventory/forms.py index 2627118c..c5e0afad 100644 --- a/ereuse_devicehub/inventory/forms.py +++ b/ereuse_devicehub/inventory/forms.py @@ -1518,7 +1518,10 @@ class UploadPlaceholderForm(FlaskForm): data = data.fillna('').to_dict() return data else: - self.source = "Excel File: {}".format(_file.filename) + if _file.content_type == 'application/vnd.oasis.opendocument.spreadsheet': + self.source = "Ods File: {}".format(_file.filename) + else: + self.source = "Excel File: {}".format(_file.filename) try: data = pd.read_excel(_file).fillna('').to_dict() except ValueError: