Fixing regex

Searching in wrong field leads to error - fixing it
This commit is contained in:
Florian 2017-04-28 23:02:50 +02:00 committed by GitHub
parent bf9a604931
commit 4e23d9856e

View file

@ -43,7 +43,7 @@ def loadCSV(typ, idField):
for row in reader:
logging.debug(row)
# only import rows with an integer as id, allow subrics though
if re.match("^[0-9]+[A-D]?$", idField, re.IGNORECASE):
if re.match("^[0-9]+[A-D]?$", row[idField], re.IGNORECASE):
try:
resultList[row[idField]] = stringConverter.convertToUTF8(row['description'])
except: