瀏覽代碼

[fix] doc.get_password

version-14
Anand Doshi 9 年之前
父節點
當前提交
26f379e08b
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      frappe/model/base_document.py

+ 1
- 1
frappe/model/base_document.py 查看文件

@@ -586,7 +586,7 @@ class BaseDocument(object):
self.set(df.fieldname, '*'*len(new_password))

def get_password(self, fieldname='password', raise_exception=True):
if not self.is_dummy_password(self.get(fieldname)):
if self.get(fieldname) and not self.is_dummy_password(self.get(fieldname)):
return self.get(fieldname)

return get_decrypted_password(self.doctype, self.name, fieldname, raise_exception=raise_exception)


Loading…
取消
儲存