Univention Bugzilla – Attachment 10460 Details for
Bug 44710
KeyError: 'pTRRecord'
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
44710.patch (text/plain), 1.69 KB, created by
Florian Best
on 2020-08-11 18:20 CEST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Florian Best
Created:
2020-08-11 18:20 CEST
Size:
1.69 KB
patch
obsolete
>diff --git a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >index 7190d24f3f..a4a77464d7 100644 >--- a/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >+++ b/management/univention-directory-manager-modules/modules/univention/admin/handlers/__init__.py >@@ -2245,11 +2245,15 @@ class simpleComputer(simpleLdap): > def modify(rdn, zoneDN): > zone_name = zoneDN.split('=')[1].split(',')[0] > for dn, attributes in self.lo.search(scope='domain', attr=['pTRRecord'], filter=filter_format('(&(relativeDomainName=%s)(zoneName=%s))', (rdn, zone_name))): >- if len(attributes['pTRRecord']) == 1: >+ ptr_records = attributes.get('pTRRecord', []) >+ removals = [] >+ if len(ptr_records) >= 1: >+ removals = [b'%s.%s.' % (name, attributes2['zoneName'][0]) for dn2, attributes2 in self.lo.search(scope='domain', attr=['zoneName'], filter=filter_format('(&(relativeDomainName=%s)(objectClass=dNSZone))', [name]), unique=False)] >+ >+ if len(ptr_records) <= 1 or set(ptr_records) == set(removals): > self.lo.delete('relativeDomainName=%s,%s' % (escape_dn_chars(rdn), zoneDN)) > else: >- for dn2, attributes2 in self.lo.search(scope='domain', attr=['zoneName'], filter=filter_format('(&(relativeDomainName=%s)(objectClass=dNSZone))', [name]), unique=False): >- self.lo.modify(dn, [('pTRRecord', '%s.%s.' % (name, attributes2['zoneName'][0]), '')]) >+ self.lo.modify(dn, [('pTRRecord', removals, '')]) > > zone = univention.admin.handlers.dns.reverse_zone.object(self.co, self.lo, self.position, zoneDN) > zone.open()
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 44710
: 10460