Use the same src text for boolean in ScreenContainer and in DomainParser

Otherwise the translated value may return a different value and then it's
comparison will fail.

issue5904
review30541002
This commit is contained in:
Sergi Almacellas Abellana committed 2016-10-13 17:05:55 +02:00
1 parent f7a44c0cfc
commit 5a8c313cc1
1 file changed
+2 -1
+2 -1
View File
@@ -232,7 +232,8 @@ def convert_value(field, value, context=None):
def convert_boolean():
if isinstance(value, basestring):
return any(test.decode('utf-8').lower().startswith(value.lower())
for test in (_('y'), _('yes'), _('true'), _('t'), '1'))
for test in (
_('y'), _('Yes'), _('True'), _('t'), '1'))
else:
return bool(value)