Fixed an issue where the lookup of recognized country names during draft submission grabbed the unicode name instead of the ascii name for non-ascii country strings in XML submissions.

- Legacy-Id: 17345
This commit is contained in:
Henrik Levkowetz 2020-02-26 17:20:13 +00:00
parent f43e547d28
commit 095c3a2ccb

View file

@ -214,8 +214,12 @@ class SubmissionBaseUploadForm(forms.Form):
"name": author.attrib.get('fullname'),
"email": author.findtext('address/email'),
"affiliation": author.findtext('organization'),
"country": author.findtext('address/postal/country'),
}
elem = author.find('address/postal/country')
if elem != None:
ascii_country = elem.get('ascii', None)
info['country'] = ascii_country if ascii_country else elem.text
for item in info:
if info[item]:
info[item] = info[item].strip()