[FIX] do not encrypt empty password
bzr revid: jth@openerp.com-20110112150518-qup0i5efc4g4xcep
This commit is contained in:
@@ -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)))
|
||||
|
||||
Reference in New Issue
Block a user