mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Do not update result of *-config-show with empty server attributes
If a server attribute such as DNSSec Key master is unset, None is passed as the attribute value into the upper API layers and displayed in the output of `dnsconfig-show` et al. We should not show this and leave the attribute empty instead. https://fedorahosted.org/freeipa/ticket/5960 Reviewed-By: Pavel Vomacka <pvomacka@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
committed by
Martin Basti
parent
894be1bd50
commit
702ab0008b
@@ -134,9 +134,11 @@ class serverroles(Backend):
|
||||
except NotImplementedError:
|
||||
return result
|
||||
|
||||
result.update(
|
||||
{name: attr.get(self.api) for name, attr in
|
||||
assoc_attributes.items()})
|
||||
for name, attr in assoc_attributes.items():
|
||||
attr_value = attr.get(self.api)
|
||||
|
||||
if attr_value is not None:
|
||||
result.update({name: attr_value})
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in New Issue
Block a user