Merge pull request #343 from eReuse/bugfix/3773-upload-placeholders

forze Phid to be string
This commit is contained in:
cayop 2022-09-14 15:35:30 +02:00 committed by GitHub
commit 2b9d5ce7ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -1520,7 +1520,9 @@ class UploadPlaceholderForm(FlaskForm):
else:
self.source = "Excel File: {}".format(_file.filename)
try:
data = pd.read_excel(_file).fillna('').to_dict()
data = (
pd.read_excel(_file, converters={'Phid': str}).fillna('').to_dict()
)
except ValueError:
txt = ["File don't have a correct format"]
self.placeholder_file.errors = txt