# HG changeset patch # User Andre Heinecke # Date 1364480949 -3600 # Node ID b91ffd97edc8d9873646ca20a7c62e5821dd2c1c # Parent 4e166c514940c38f4fcd360d8666026b6fa81f80 Explicitly set sectie und sobek to 0 by default diff -r 4e166c514940 -r b91ffd97edc8 flys-backend/contrib/shpimporter/boundaries.py --- a/flys-backend/contrib/shpimporter/boundaries.py Thu Mar 28 15:28:05 2013 +0100 +++ b/flys-backend/contrib/shpimporter/boundaries.py Thu Mar 28 15:29:09 2013 +0100 @@ -59,9 +59,13 @@ newFeat.SetField("kind", kind) if self.IsFieldSet(feat, "SECTIE"): newFeat.SetField("sectie", feat.GetField("SECTIE")) + else: + newFeat.SetField("sectie", 0) if self.IsFieldSet(feat, "SOBEK"): newFeat.SetField("sobek", feat.GetField("SOBEK")) + else: + newFeat.SetField("sobek", 0) if self.IsFieldSet(feat, "river_id"): newFeat.SetField("river_id", feat.GetField("river_id")) @@ -102,10 +106,13 @@ if self.IsFieldSet(feat, "SECTIE"): newFeat.SetField("sectie", feat.GetField("SECTIE")) + else: + newFeat.SetField("sectie", 0) if self.IsFieldSet(feat, "SOBEK"): newFeat.SetField("sobek", feat.GetField("SOBEK")) - + else: + newFeat.SetField("sobek", 0) if self.IsFieldSet(feat, "river_id"): newFeat.SetField("river_id", feat.GetField("river_id"))