Univention Bugzilla – Bug 47083
udm/add (mail/mail): TypeError: sequence item 1: expected string, NoneType found
Last modified: 2020-10-21 15:14:15 CEST
Version: 4.3-0 errata84 (Neustadt) Interner Server-Fehler in "udm/add (mail/mail)". Request: udm/add (mail/mail) Traceback (most recent call last): File "%PY2.7%/notifier/threads.py", line 82, in _run tmp = self._function() File "%PY2.7%/notifier/__init__.py", line 104, in __call__ return self._function( *tmp, **self._kwargs ) File "%PY2.7%/univention/management/console/modules/udm/__init__.py", line 369, in _thread dn = module.create(properties, container=options.get('container'), superordinate=options.get('superordinate')) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 83, in _decorated return method(*args, **kwargs) File "%PY2.7%/univention/management/console/ldap.py", line 143, in _decorated result = func(*args, **kwargs) File "%PY2.7%/univention/management/console/modules/udm/udm_ldap.py", line 394, in create obj.create() File "%PY2.7%/univention/admin/handlers/__init__.py", line 483, in create dn = self._create(response=response, serverctrls=serverctrls) File "%PY2.7%/univention/admin/handlers/__init__.py", line 989, in _create al.extend(self._ldap_modlist()) File "%PY2.7%/univention/admin/handlers/mail/folder.py", line 266, in _ldap_modlist new_acls_tmp.append(' '.join(acl)) TypeError: sequence item 1: expected string, NoneType found
Should be already fixed with bug #47810. *** This bug has been marked as a duplicate of bug 47810 ***
(In reply to Toni Röhmeyer from comment #1) > Should be already fixed with bug #47810. > > *** This bug has been marked as a duplicate of bug 47810 *** No, your bug is for oxmail/oxfolder.py while this Bug is about mail/folder.py.
Oh I'm sorry; I overlooked that. However, the fix from bug#47810 was sufficient to fix this error as well. I tested it by adding a folder with a group selected, but no acl set. The warning does not occur anymore for this case. I pushed my solution with commit 2f7f1ce87e Bug #47083: check if acl is not None to branch troehmey/bug47083_no_acl_set_error
(In reply to Toni Röhmeyer from comment #3) > I tested it by adding a folder with a group selected, but no acl set. > The warning does not occur anymore for this case. Can you print the UDM commands to reproduce this?
Reproducible: udm mail/folder create --set sharedFolderGroupACL='"Domain Users" "c"' --set name=foo --set mailDomain=localhost --set mailHomeServer=localhost curl 'http://Administrator:univention@localhost/univention/command/udm/add' \ -H 'Accept: application/json; q=1.0, text/html; q=0.3; */*; q=0.1' \ -H 'X-Requested-With: XMLHttpRequest' \ -H 'Accept-Language: de-DE' \ -H 'Content-Type: application/json' \ --data-binary '{"options":[{"object":{"mailDomain":"school.dev","sharedFolderGroupACL":[["Domain Users",""]],"name":"test","mailHomeServer":"master80.school.dev","$policies$":{}},"options":{"container":"cn=folder,cn=mail,l=school,l=dev","objectType":"mail/folder","objectTemplate":"None"}}],"flavor":"mail/mail"}'