[FIX] do not encrypt empty password
bzr revid: jth@openerp.com-20110112150518-qup0i5efc4g4xcep
This commit is contained in:
parent
4448a67b49
commit
c9fc809271
|
@ -240,7 +240,7 @@ class users(osv.osv):
|
|||
res = cr.fetchall()
|
||||
for i, p in res:
|
||||
encrypted = p
|
||||
if not p.startswith(magic_md5):
|
||||
if p and not p.startswith(magic_md5):
|
||||
encrypted = encrypt_md5(p, gen_salt())
|
||||
cr.execute('update res_users set password=%s where id=%s',
|
||||
(encrypted.encode('utf-8'), int(i)))
|
||||
|
|
Loading…
Reference in New Issue