mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
idrange-add: properly handle empty --dom-name option
When idrange-add is called with --dom-name=, the CLI exits with ipa: ERROR: an internal error has occurred This happens because the code checks if the option is provided but does not check if the value is None. We need to handle empty dom-name as if the option was not specified. https://pagure.io/freeipa/issue/6404 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
parent
1aa77fe389
commit
70743c8c48
@ -411,7 +411,7 @@ class idrange_add(LDAPCreate):
|
|||||||
|
|
||||||
# This needs to stay in options since there is no
|
# This needs to stay in options since there is no
|
||||||
# ipanttrusteddomainname attribute in LDAP
|
# ipanttrusteddomainname attribute in LDAP
|
||||||
if 'ipanttrusteddomainname' in options:
|
if options.get('ipanttrusteddomainname'):
|
||||||
if is_set('ipanttrusteddomainsid'):
|
if is_set('ipanttrusteddomainsid'):
|
||||||
raise errors.ValidationError(name='ID Range setup',
|
raise errors.ValidationError(name='ID Range setup',
|
||||||
error=_('Options dom-sid and dom-name '
|
error=_('Options dom-sid and dom-name '
|
||||||
|
Loading…
Reference in New Issue
Block a user