diff options
author | Alexander Bokovoy <abokovoy@redhat.com> | 2011-07-07 18:58:18 +0300 |
---|---|---|
committer | Martin Kosek <mkosek@redhat.com> | 2011-07-13 12:02:46 +0200 |
commit | b93e0b8bbfaa1e9252b3d096ef9251493654dec2 (patch) | |
tree | e261bcb0bfdccf12be4a152b55eb8ff341b9d542 /ipalib/parameters.py | |
parent | f534445e26ebfca38afe1c834ba088cbcbc24e37 (diff) | |
download | freeipa-b93e0b8bbfaa1e9252b3d096ef9251493654dec2.tar.gz freeipa-b93e0b8bbfaa1e9252b3d096ef9251493654dec2.tar.xz freeipa-b93e0b8bbfaa1e9252b3d096ef9251493654dec2.zip |
Convert nsaccountlock to always work as bool towards Python code
https://fedorahosted.org/freeipa/ticket/1259
Python code will see nsaccountlock as bool. JavaScript code will also see it as bool.
This allows native boolean operations with the lock field. Passes both CLI and WebUI tests.
Diffstat (limited to 'ipalib/parameters.py')
-rw-r--r-- | ipalib/parameters.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py index 75981e96..da3b05cf 100644 --- a/ipalib/parameters.py +++ b/ipalib/parameters.py @@ -904,8 +904,8 @@ class Bool(Param): # FIXME: This my quick hack to get some UI stuff working, change these defaults # --jderose 2009-08-28 kwargs = Param.kwargs + ( - ('truths', frozenset, frozenset([1, u'1', u'true', u'TRUE'])), - ('falsehoods', frozenset, frozenset([0, u'0', u'false', u'FALSE'])), + ('truths', frozenset, frozenset([1, u'1', True, u'true', u'TRUE'])), + ('falsehoods', frozenset, frozenset([0, u'0', False, u'false', u'FALSE'])), ) def _convert_scalar(self, value, index=None): |