Frappe.db.get_value for password field returns '****'

Hello from Munich,

Edit: I’m a moron. This exact topic is already present in this category.

I noticed that with the the upgrade to erpnext V7 an app I had around stopped working. This may be just a unlucky coincidence but hopefully someone can point me in the right direction.

What I want: Get a db value from document with Single DocType like so:

pw = frappe.db.get_value("Connection Settings", filters = None, fieldname = "erpnext_password")

The field type is “password”.

Once this yielded a decoded password, but now I’m getting stars (“******”) as a result.
Is this supposed to work or how should I approach this?

Greetings
Maxi

Sorry to be late but giving an example will be helpful to everyone. We should use the ‘get_password’ method of the document.

docSettings = frappe.get_single("Connection Settings")
strPassword = docSettings.get_password('erpnext_password')
10 Likes