summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ipalib/plugins/sudorule.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ipalib/plugins/sudorule.py b/ipalib/plugins/sudorule.py
index a7fd82775..7b70356e1 100644
--- a/ipalib/plugins/sudorule.py
+++ b/ipalib/plugins/sudorule.py
@@ -448,7 +448,8 @@ class sudorule_remove_host(LDAPRemoveMember):
except errors.EmptyModlist:
pass
failed['memberhost']['host'] = failed_hosts
- entry_attrs['externalhost'] = external_hosts
+ if external_hosts:
+ entry_attrs['externalhost'] = external_hosts
return (completed + completed_external, dn)
api.register(sudorule_remove_host)