fix: adjust a few more queries

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang
2025-11-20 18:14:34 +05:30
parent 1cf9f903e5
commit 13f8bcd289
2 changed files with 9 additions and 4 deletions

View File

@@ -409,7 +409,9 @@ def get_children(doctype, parent, task=None, project=None, is_root=False):
# via expand child
filters.append(["parent_task", "=", parent])
else:
filters.append(['ifnull(`parent_task`, "")', "=", ""])
from frappe.query_builder import Field, functions
filters.append(functions.IfNull(Field("parent_task"), "") == "")
if project:
filters.append(["project", "=", project])