On 15.08.2011 16:56, Jan Cholasta wrote: > https://fedorahosted.org/freeipa/ticket/1632 NACK.
I would rather see it fixed for all record types similarly. In order to do that, instead of fixing a callback for PTR record it would be good to fix pre_callback that calls it. Patch attached. -- / Alexander Bokovoy
From c7c414f32a56bb675f9d6b808daf609434fb1aa3 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy <[email protected]> Date: Mon, 15 Aug 2011 18:35:32 +0300 Subject: [PATCH] Pass empty options as empty arrays for supported dns record types. https://fedorahosted.org/freeipa/ticket/1632 --- ipalib/plugins/dns.py | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/ipalib/plugins/dns.py b/ipalib/plugins/dns.py index 105678b23c9faae3cc34ffc9084fc37d9ca29265..e967c5c03a91fcbff82a7d8e62cdc8157a4a461d 100644 --- a/ipalib/plugins/dns.py +++ b/ipalib/plugins/dns.py @@ -886,6 +886,8 @@ class dnsrecord_mod(dnsrecord_mod_record): def pre_callback(self, ldap, dn, entry_attrs, *keys, **options): for rtype in options: rtype_cb = '_%s_pre_callback' % rtype + if options[rtype] is None and rtype in _record_attributes: + options[rtype] = [] if hasattr(self.obj, rtype_cb): dn = getattr(self.obj, rtype_cb)(ldap, dn, entry_attrs, *keys, **options) -- 1.7.6
_______________________________________________ Freeipa-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/freeipa-devel
