mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Allow erasing ipaDomainResolutionOrder attribute
Currently when trying to erase the ipaDomainResolutionOrder attribute we hit an internal error as the split() method is called on a None object. By returning early in case of empty string we now allow removing the ipaDomainResolutionOrder attribute by both calling delattr or setting its value to an empty string. https://pagure.io/freeipa/issue/6825 Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
0d817ae63a
commit
e03056cf34
@ -359,6 +359,11 @@ class config(LDAPObject):
|
||||
|
||||
domain_resolution_order = entry_attrs[attr_name]
|
||||
|
||||
# setting up an empty string means that the previous configuration has
|
||||
# to be cleaned up/removed. So, do nothing and let it pass
|
||||
if not domain_resolution_order:
|
||||
return
|
||||
|
||||
# empty resolution order is signalized by single separator, do nothing
|
||||
# and let it pass
|
||||
if domain_resolution_order == DOMAIN_RESOLUTION_ORDER_SEPARATOR:
|
||||
|
Loading…
Reference in New Issue
Block a user