diff options
Diffstat (limited to 'ipaserver/plugins')
| -rw-r--r-- | ipaserver/plugins/location.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ipaserver/plugins/location.py b/ipaserver/plugins/location.py index 1edda8e25..32306648c 100644 --- a/ipaserver/plugins/location.py +++ b/ipaserver/plugins/location.py @@ -137,6 +137,14 @@ class location_del(LDAPDelete): msg_summary = _('Deleted IPA location "%(value)s"') + def pre_callback(self, ldap, dn, *keys, **options): + assert isinstance(dn, DN) + servers = self.api.Command.server_find( + in_location=keys[-1])['result'] + for server in servers: + self.api.Command.server_mod(server['cn'][0], location=None) + return dn + @register() class location_mod(LDAPUpdate): |
