mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 07:32:50 +00:00
perf: don't use ifnull where it's not required (#36336)
ifnull isn't really required when doing `!= 'anything'` because if it's null then value will be falsy. ifnull is only required when checking `= ''` if you treat `null = ''` Actuall better fix would be make things explcitly non-nullable, then we won't ever have to add this on such fields. ref: https://github.com/frappe/frappe/pull/21822
This commit is contained in:
@@ -161,7 +161,7 @@ def get_leaf_boms() -> List[str]:
|
||||
"""select name from `tabBOM` bom
|
||||
where docstatus=1 and is_active=1
|
||||
and not exists(select bom_no from `tabBOM Item`
|
||||
where parent=bom.name and ifnull(bom_no, '')!='')"""
|
||||
where parent=bom.name and bom_no !='')"""
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user