diff --git a/frappe/model/qb_query.py b/frappe/model/qb_query.py index d6785167c1..004d44ff94 100644 --- a/frappe/model/qb_query.py +++ b/frappe/model/qb_query.py @@ -12,6 +12,7 @@ from frappe.deprecation_dumpster import deprecation_warning from frappe.model.utils import is_virtual_doctype from frappe.model.utils.user_settings import get_user_settings, update_user_settings from frappe.query_builder.utils import Column +from frappe.utils import sbool class DatabaseQuery: @@ -211,7 +212,7 @@ class DatabaseQuery: result = query.run(debug=debug, as_dict=not as_list, update=update) # Add comment count if requested and not as_list - if with_comment_count and not as_list and self.doctype: + if sbool(with_comment_count) and not as_list and self.doctype: self._add_comment_count(result) # Save user settings if requested