Merge pull request #343 from eReuse/bugfix/3773-upload-placeholders
forze Phid to be string
This commit is contained in:
commit
2b9d5ce7ed
|
@ -1520,7 +1520,9 @@ class UploadPlaceholderForm(FlaskForm):
|
||||||
else:
|
else:
|
||||||
self.source = "Excel File: {}".format(_file.filename)
|
self.source = "Excel File: {}".format(_file.filename)
|
||||||
try:
|
try:
|
||||||
data = pd.read_excel(_file).fillna('').to_dict()
|
data = (
|
||||||
|
pd.read_excel(_file, converters={'Phid': str}).fillna('').to_dict()
|
||||||
|
)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
txt = ["File don't have a correct format"]
|
txt = ["File don't have a correct format"]
|
||||||
self.placeholder_file.errors = txt
|
self.placeholder_file.errors = txt
|
||||||
|
|
Reference in New Issue