diff options
author | Martin Basti <[email protected]> | 2014-09-04 15:48:16 +0200 |
---|---|---|
committer | Petr Viktorin <[email protected]> | 2014-09-05 10:34:11 +0200 |
commit | 9e8aed8e53b91605685cd050cfdc27c41112ceb8 (patch) | |
tree | ff9c134a2c5a00b6290ed986db05a933600c9abb /ipalib | |
parent | 5aead1ff6fd6709a267fc91cb2e437d504ad2bac (diff) | |
download | freeipa-9e8aed8e53b91605685cd050cfdc27c41112ceb8.tar.gz freeipa-9e8aed8e53b91605685cd050cfdc27c41112ceb8.tar.xz freeipa-9e8aed8e53b91605685cd050cfdc27c41112ceb8.zip |
Fix dnsrecord-mod raise error if last record attr is removed
Removing last record attribute causes output type validation error
Reviewed-By: Jan Cholasta <[email protected]>
Diffstat (limited to 'ipalib')
-rw-r--r-- | ipalib/plugins/dns.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index fdcccb0b7..dae57e6c3 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -3374,6 +3374,13 @@ class dnsrecord_mod(LDAPUpdate): if del_all: result = self.obj.methods.delentry(*keys, version=options['version']) + + # we need to modify delete result to match mod output type + # only one value is expected, not a list + if client_has_capability(options['version'], 'primary_key_types'): + assert len(result['value']) == 1 + result['value'] = result['value'][0] + # indicate that entry was deleted context.dnsrecord_entry_mods[(keys[0], keys[1])] = None |