From 4e23d9856edc3f574494cc919fdfe11a4ebc3f37 Mon Sep 17 00:00:00 2001 From: Florian Date: Fri, 28 Apr 2017 23:02:50 +0200 Subject: [PATCH] Fixing regex Searching in wrong field leads to error - fixing it --- includes/descriptionList.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/descriptionList.py b/includes/descriptionList.py index 7e959b7..e9252b3 100644 --- a/includes/descriptionList.py +++ b/includes/descriptionList.py @@ -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: