Browse Source

[10.0][FIX] Error when set disable History password (set History in Company as 0) of user in company (#1126)

* [FIX] Error when set disable History password of user in company

* [REF] Update version
pull/1145/merge
nguyenductamlhp 7 years ago
committed by Jairo Llopis
parent
commit
3110671291
  1. 4
      password_security/models/res_users.py

4
password_security/models/res_users.py

@ -139,7 +139,9 @@ class ResUsers(models.Model):
crypt = self._crypt_context()
for rec_id in self:
recent_passes = rec_id.company_id.password_history
if recent_passes < 0:
if recent_passes == 0:
continue
elif recent_passes < 0:
recent_passes = rec_id.password_history_ids
else:
recent_passes = rec_id.password_history_ids[

Loading…
Cancel
Save