Created
January 19, 2013 21:37
-
-
Save ianjosephwilson/4575364 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r 91e0c59c47aa tryton/common/domain_parser.py | |
--- a/tryton/common/domain_parser.py Thu Jan 03 16:29:35 2013 +0100 | |
+++ b/tryton/common/domain_parser.py Sat Jan 19 13:33:42 2013 -0800 | |
@@ -749,9 +749,9 @@ | |
def string_(clause): | |
if not clause: | |
return '' | |
- if (isinstance(clause[0], basestring) | |
- and (clause[0] in self.fields | |
- or clause[0] == 'rec_name')): | |
+ if isinstance(clause[0], basestring) and clause[0] not in ('AND', 'OR'): | |
+ assert clause[0] in self.fields or clause[0] == 'rec_name', | |
+ "Field in clause is not available to parser." | |
name, operator, value = clause | |
if name not in self.fields: | |
escaped = value.replace('%%', '__') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment