perf: Remove frappe.utils.password from import tree
This commit is contained in:
parent
2413f7e6ec
commit
3f0409a2af
1 changed files with 4 additions and 1 deletions
|
|
@ -12,7 +12,6 @@ from frappe.model.naming import set_new_name
|
|||
from frappe.model.utils.link_count import notify_link_count
|
||||
from frappe.modules import load_doctype_module
|
||||
from frappe.model import display_fieldtypes
|
||||
from frappe.utils.password import get_decrypted_password, set_encrypted_password
|
||||
from frappe.utils import (cint, flt, now, cstr, strip_html,
|
||||
sanitize_html, sanitize_email, cast_fieldtype)
|
||||
from frappe.utils.html_utils import unescape_html
|
||||
|
|
@ -741,6 +740,8 @@ class BaseDocument(object):
|
|||
|
||||
def _save_passwords(self):
|
||||
"""Save password field values in __Auth table"""
|
||||
from frappe.utils.password import set_encrypted_password
|
||||
|
||||
if self.flags.ignore_save_passwords is True:
|
||||
return
|
||||
|
||||
|
|
@ -755,6 +756,8 @@ class BaseDocument(object):
|
|||
self.set(df.fieldname, '*'*len(new_password))
|
||||
|
||||
def get_password(self, fieldname='password', raise_exception=True):
|
||||
from frappe.utils.password import get_decrypted_password
|
||||
|
||||
if self.get(fieldname) and not self.is_dummy_password(self.get(fieldname)):
|
||||
return self.get(fieldname)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue