schema.py
changeset 10653 42c5bd7286b7
parent 10612 84468b90e9c1
child 10661 e6eb0c7c2e98
--- a/schema.py	Tue Sep 08 13:43:57 2015 +0200
+++ b/schema.py	Tue Sep 08 16:26:56 2015 +0200
@@ -146,7 +146,10 @@
     suppressing and reinserting an expression if only a space has been
     added/removed for instance)
     """
-    return u', '.join(' '.join(expr.split()) for expr in rqlstring.split(','))
+    union = parse(u'Any 1 WHERE %s' % rqlstring).as_string()
+    if isinstance(union, str):
+        union = union.decode('utf-8')
+    return union.split(' WHERE ', 1)[1]
 
 
 def _check_valid_formula(rdef, formula_rqlst):