Pass empty options as empty arrays for supported dns record types. https://fedorahosted.org/freeipa/ticket/1632

This commit is contained in:
Alexander Bokovoy authored and Rob Crittenden committed 2011-08-15 00:33:55 -04:00
1 parent 0fcc752f86
commit bc8ea3ae4e
1 file changed
+2
+2
View File
@@ -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)