sources/ldap: skip values which are of type bytes

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-10-27 15:43:38 +02:00
parent 0273ae16df
commit 9e0daf2bcf
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,8 @@ class BaseLDAPSynchronizer:
value = mapping.evaluate(user=None, request=None, ldap=kwargs, dn=object_dn)
if value is None:
continue
if isinstance(value, (bytes)):
continue
object_field = mapping.object_field
if object_field.startswith("attributes."):
# Because returning a list might desired, we can't