add Ods File as description in Placeholders Log

This commit is contained in:
Cayo Puigdefabregas 2022-09-14 15:43:34 +02:00
parent d08b93d3fd
commit 0ed523ca5c
1 changed files with 4 additions and 1 deletions

View File

@ -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: