Merge pull request #344 from eReuse/bugfix/3772-excel-name
add Ods File as description in Placeholders Log
This commit is contained in:
commit
07c641f4b9
|
@ -1518,7 +1518,10 @@ class UploadPlaceholderForm(FlaskForm):
|
||||||
data = data.fillna('').to_dict()
|
data = data.fillna('').to_dict()
|
||||||
return data
|
return data
|
||||||
else:
|
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:
|
try:
|
||||||
data = (
|
data = (
|
||||||
pd.read_excel(_file, converters={'Phid': str}).fillna('').to_dict()
|
pd.read_excel(_file, converters={'Phid': str}).fillna('').to_dict()
|
||||||
|
|
Reference in New Issue