mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 05:59:18 +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:
@@ -77,7 +77,7 @@ def get_issued_items_cost():
|
||||
"""select se.project, sum(se_item.amount) as amount
|
||||
from `tabStock Entry` se, `tabStock Entry Detail` se_item
|
||||
where se.name = se_item.parent and se.docstatus = 1 and ifnull(se_item.t_warehouse, '') = ''
|
||||
and ifnull(se.project, '') != '' group by se.project""",
|
||||
and se.project != '' group by se.project""",
|
||||
as_dict=1,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user