fixed issue #1138, ldap and python 2.6.x problem

This commit is contained in:
mdipierro
2015-12-24 09:15:19 -06:00
parent 4b0e1856b5
commit 8e4ea3497b
+2 -1
View File
@@ -432,7 +432,8 @@ def ldap_auth(server='ldap',
# #############
fields = ['first_name', 'last_name']
user_in_db = db(db.auth_user.email == username)
update_or_insert_values = {f: update_or_insert_values[f] for f in fields}
update_or_insert_values = dict(((f, update_or_insert_values[f]) for f in fields))
if user_in_db.count() > 0:
actual_values = user_in_db.select(*[db.auth_user[f] for f in fields]).first().as_dict()
if update_or_insert_values != actual_values: # We don't update record if values are the same