summaryrefslogtreecommitdiffstats
path: root/ipalib/parameters.py
diff options
context:
space:
mode:
authorAlexander Bokovoy <abokovoy@redhat.com>2011-07-07 18:58:18 +0300
committerAlexander Bokovoy <abokovoy@redhat.com>2011-07-12 13:36:12 +0300
commit40ce1cde62113e8091ed8fae6a2acdf03e7b9c9c (patch)
tree5ead9f82d1e5ce5f45ef664bfc354251c396bc9d /ipalib/parameters.py
parent3229eee074e6b419f64faa9bb701a60fe96da3a6 (diff)
downloadfreeipa-ticket-1259.tar.gz
freeipa-ticket-1259.tar.xz
freeipa-ticket-1259.zip
Convert nsaccountlock to always work as bool towards Python codeticket-1259
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.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipalib/parameters.py b/ipalib/parameters.py
index 3d9f208d2..56ce056a6 100644
--- a/ipalib/parameters.py
+++ b/ipalib/parameters.py
@@ -903,8 +903,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):