schema: properly fix Flag arguments on the client

The previous fix in commit a77e21cbca made
some Bool arguments appear as Flag on the client. This change fixes that.

https://fedorahosted.org/freeipa/ticket/6009

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta
2016-06-30 10:27:05 +02:00
parent aaf65e9c56
commit 8d5272e687

View File

@@ -219,8 +219,8 @@ class _SchemaPlugin(object):
cls = Password
sensitive = False
elif (type_name == 'bool' and
'default' in schema and
schema['default'][0] == u'False'):
'default' in schema and schema['default'][0] == u'False' and
not schema.get('alwaysask', False)):
cls = Flag
del schema['default']
else: