[Formed-commits] r409 - trunk/formed/formed/plugins/export

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Oct 6 11:31:53 CEST 2010


Author: torsten
Date: 2010-10-06 11:31:52 +0200 (Wed, 06 Oct 2010)
New Revision: 409

Modified:
   trunk/formed/formed/plugins/export/rules_sh.py
Log:
* formed/formed/plugins/export/rules_sh.py (generate_tagging): Fixed
	gerating SQL for Rules


Modified: trunk/formed/formed/plugins/export/rules_sh.py
===================================================================
--- trunk/formed/formed/plugins/export/rules_sh.py	2010-10-05 16:30:38 UTC (rev 408)
+++ trunk/formed/formed/plugins/export/rules_sh.py	2010-10-06 09:31:52 UTC (rev 409)
@@ -30,10 +30,7 @@
     out.append('%s::date' % node.eval())
     return " ".join(out)
 
-def sql_var(node, document):
-    out = []
-    out.append(node.var_name)
-    return " ".join(out)
+def sql_var(node, document): out = [] out.append(node.var_name) return " ".join(out)
 
 def sql_const(node, document):
     out = []
@@ -188,7 +185,7 @@
         name = rule.getDescription().replace("'", '"')
         desc = rule.getValue().replace("'", '"')
         add_sql = base_sql % {
-            'where': recursive_parse(rule.getExpr().prog, document)}
+            'where': "NOT ( %s )" % recursive_parse(rule.getExpr().prog, document)}
         del_sql = base_sql % {
             'where': "TRUE"}
         if tag >= 1000:



More information about the Formed-commits mailing list