fix(with_comment_count): handle string values
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
c0ebc96597
commit
3a2dcaa2de
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue