Cannot save Server Script

But I am stuck at saving Server Script.

This this is the code that I am trying to save but it is not getting saved.

@frappe.whitelist()
def get_processes(bomtemp):
    bom_operations = frappe.db.sql(f""" SELECT name FROM `tabMy BOM Operation` WHERE 'parent'='{bomtemp}' """, as_dict=True)
return bom_operations

I keep getting this error.

Script: Invalid python code on line 4
return bom_operations

Please guide as to how to solve this.

Regards,

Hi @yogeshvachhani,

Please apply it.
it’s a tab issue.

@frappe.whitelist()
def get_processes(bomtemp):
    bom_operations = frappe.db.sql(f""" SELECT name FROM `tabMy BOM Operation` WHERE 'parent'='{bomtemp}' """, as_dict=True)
    return bom_operations

Thank You!

1 Like

I agreed with your answer. My problem is solved. I am very happy:blush:.

Have a nice day to all:+1:.