changeset 5407:db5def5456ce

Only match strings vor field values
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 25 Mar 2013 17:00:37 +0100
parents e88d55d01cf5
children 91f5908c472a
files flys-backend/contrib/shpimporter/importer.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/importer.py	Mon Mar 25 15:46:21 2013 +0100
+++ b/flys-backend/contrib/shpimporter/importer.py	Mon Mar 25 17:00:37 2013 +0100
@@ -53,6 +53,8 @@
         @returns the name of the field where a match was found or None
         """
         for val in feat.items():
+            if not isinstance(feat.items()[val], basestring):
+                continue
             match = re.match(regex, feat.items()[val], re.IGNORECASE)
             if match:
                 return val

http://dive4elements.wald.intevation.org