Mercurial > dive4elements > river
changeset 5365:90f1c5f67698
Importer: Do not return true for IsDoubleField set if the field
does not exist.
This prohibits the import of km's without a km attribute.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Thu, 21 Mar 2013 18:24:47 +0100 (2013-03-21) |
parents | 51db7fbc2e77 |
children | 8605ceae8476 |
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 Thu Mar 21 16:52:07 2013 +0100 +++ b/flys-backend/contrib/shpimporter/importer.py Thu Mar 21 18:24:47 2013 +0100 @@ -73,6 +73,8 @@ return result def IsDoubleFieldSet(self, feat, name): + if not self.IsFieldSet(feat, name): + return False try: isset = feat.GetFieldAsDouble(name) return isset is not None