changeset 5382:f66a6c1a73e7

Explicitly force the kind to be 2 when it is not set. This is the default in the database schema but it is not used in oracle
author Andre Heinecke <aheinecke@intevation.de>
date Fri, 22 Mar 2013 16:54:43 +0100
parents d6782d0c7472
children c841eac48474
files flys-backend/contrib/shpimporter/hws.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-backend/contrib/shpimporter/hws.py	Fri Mar 22 11:56:37 2013 +0100
+++ b/flys-backend/contrib/shpimporter/hws.py	Fri Mar 22 16:54:43 2013 +0100
@@ -116,8 +116,11 @@
             if not kind_id:
                 logger.warn("Unknown Art: %s" % \
                         feat.GetField(artname))
+                newFeat.SetField("kind_id", 2)
             else:
                 newFeat.SetField("kind_id", kind_id)
+        else:
+            newFeat.SetField("kind_id", 2)
 
         fname = self.searchField("Bundesland$")
         if self.IsFieldSet(feat, fname):

http://dive4elements.wald.intevation.org