From 3e767d63a565655a89ea1a98133a80aa3963a35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 25 Jan 2010 09:18:28 +0100 Subject: [PATCH] Test also password value for empty password --- res.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/res.py b/res.py index 5ec2ecfaac..d1e7261bb2 100644 --- a/res.py +++ b/res.py @@ -71,13 +71,13 @@ class User(ModelSQL, ModelView): context=context) def create(self, cursor, user, vals, context=None): - if 'password' in vals and 'login' in vals: + if vals.get('password') and 'login' in vals: self._check_passwd_ldap_user(cursor, user, [vals['login']], context=context) return super(User, self).create(cursor, user, vals, context=context) def write(self, cursor, user, ids, vals, context=None): - if 'password' in vals: + if vals.get('password'): if isinstance(ids, (int, long)): ids2 = [ids] else: