diff options
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/netgroup.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ipalib/plugins/netgroup.py b/ipalib/plugins/netgroup.py index 06372a592..693c00c1a 100644 --- a/ipalib/plugins/netgroup.py +++ b/ipalib/plugins/netgroup.py @@ -202,7 +202,10 @@ class netgroup_mod(LDAPUpdate): msg_summary = _('Modified netgroup "%(value)s"') def pre_callback(self, ldap, dn, entry_attrs, attrs_list, *keys, **options): - (dn, entry_attrs) = ldap.get_entry(dn, attrs_list) + try: + (dn, entry_attrs) = ldap.get_entry(dn, attrs_list) + except errors.NotFound: + self.obj.handle_not_found(*keys) if is_all(options, 'usercategory') and 'memberuser' in entry_attrs: raise errors.MutuallyExclusiveError(reason="user category cannot be set to 'all' while there are allowed users") if is_all(options, 'hostcategory') and 'memberhost' in entry_attrs: |