Found a bug using frappe.db.get_list in Client Side (Frappe v15.100.1)

Hi guys,

I want to validate from you guys if I am only experiencing this issue.

I have tried to get the list Payment Entry Reference from Payment Request. When I return specific fields like reference_name, parent and other fields, it only returns allocated_amount and parent.

    let payment_entry_reference = await frappe.db.get_list("Payment Entry Reference", {

        fields: ["reference_name", "parent","reference_doctype", "allocated_amount"]

    });

    console.log("Payment Entry References: ", payment_entry_reference);

Logs:

This is a permissions issue. frappe.db.get_list() silently drops fields the current user doesn’t have permission to read no error is thrown, the fields are just omitted.

use ignore_permissions=True in Python server-side, or create a whitelisted @frappe.whitelist() method and call it from JS via frappe.call().

1 Like

That time I am using Administrator account. Yep that’s what I do I used frappe.call for safest data query. Thank you for the information.

1 Like