From 57bc2ebf570a9c54f29a1aa44fb0302b83832c0d Mon Sep 17 00:00:00 2001 From: Ahmed Hasanin <52963581+AHasanin@users.noreply.github.com> Date: Mon, 19 Dec 2022 08:20:58 +0200 Subject: [PATCH] fix(workflow): Remove docstatus field from get_workflow_state_count (#19332) remove docstatus from get_workflow_state_count as it is not being used and causes error with postgresql as it requires the selected column to either appear in the group by clause or an aggregat function [skip ci] --- frappe/workflow/doctype/workflow/workflow.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/workflow/doctype/workflow/workflow.py b/frappe/workflow/doctype/workflow/workflow.py index d524d43d41..9ab903b518 100644 --- a/frappe/workflow/doctype/workflow/workflow.py +++ b/frappe/workflow/doctype/workflow/workflow.py @@ -136,7 +136,7 @@ def get_workflow_state_count(doctype, workflow_state_field, states): states = frappe.parse_json(states) result = frappe.get_all( doctype, - fields=[workflow_state_field, "count(*) as count", "docstatus"], + fields=[workflow_state_field, "count(*) as count"], filters={workflow_state_field: ["not in", states]}, group_by=workflow_state_field, )