properly use substitution for rql query argument stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 18 Nov 2009 09:16:38 +0100
branchstable
changeset 3876 1169d3154be6
parent 3875 c2bd7922cdaf
child 3877 7ca53fc72a0a
child 3878 3af225f0faa0
properly use substitution for rql query argument
server/schemaserial.py
--- a/server/schemaserial.py	Wed Nov 18 09:16:00 2009 +0100
+++ b/server/schemaserial.py	Wed Nov 18 09:16:38 2009 +0100
@@ -522,8 +522,8 @@
     for action in erschema.ACTIONS:
         for group in sorted(erschema.get_groups(action)):
             try:
-                yield ('SET X %s_permission Y WHERE X is %s, X name "%s", Y eid %s'
-                       % (action, etype, erschema, groupmapping[group]), None)
+                yield ('SET X %s_permission Y WHERE X is %s, X name %%(name)s, Y eid %s'
+                       % (action, etype, groupmapping[group]), {'name': str(erschema)})
             except KeyError:
                 continue
         for rqlexpr in sorted(erschema.get_rqlexprs(action)):