[Dive4elements-commits] [PATCH] Explicitly force the kind to be 2 when it is not set

Wald Commits scm-commit at wald.intevation.org
Fri Mar 22 16:55:48 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1363967683 -3600
# Node ID f66a6c1a73e7cc48034bad215e9536d4037404c7
# Parent  d6782d0c7472223a0cdd3dee0f7853f31a839026
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

diff -r d6782d0c7472 -r f66a6c1a73e7 flys-backend/contrib/shpimporter/hws.py
--- 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):


More information about the Dive4elements-commits mailing list