Mercurial > dive4elements > river
diff flys-backend/contrib/shpimporter/importer.py @ 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 |
parents | b3a15fa3d88e |
children | 6c2751c17869 |
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