From fa96b59aa9e3bb226ba0bcb657a967f03fc2939d Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Fri, 22 Mar 2019 13:27:58 +0000 Subject: [PATCH] [FIX] users_ldap_populate: Wrong attribute usage The variable is a dict, and the desired value must be accessed via key, not attribute. This fixes a bug introduced in https://github.com/OCA/server-tools/pull/1519. --- users_ldap_populate/README.rst | 1 + users_ldap_populate/models/users_ldap.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/users_ldap_populate/README.rst b/users_ldap_populate/README.rst index 8a632d127..250b3653f 100644 --- a/users_ldap_populate/README.rst +++ b/users_ldap_populate/README.rst @@ -55,6 +55,7 @@ Contributors * Holger Brunn * Daniel Reis * Stefan Rijnhart +* Jairo Llopis Maintainer ---------- diff --git a/users_ldap_populate/models/users_ldap.py b/users_ldap_populate/models/users_ldap.py index ddf4ff883..dacba1271 100644 --- a/users_ldap_populate/models/users_ldap.py +++ b/users_ldap_populate/models/users_ldap.py @@ -160,7 +160,7 @@ class CompanyLDAP(orm.Model): bool( self.get_ldap_entry_dicts( conf, - user_name=unknown_user.login, + user_name=unknown_user['login'], )) for conf in self.get_ldap_dicts(cr, ids) )