浏览代码

No Tags was not counting emtpy tags (#4231)

version-14
KanchanChauhan 7 年前
committed by Rushabh Mehta
父节点
当前提交
8c8e9fdd98
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. +1
    -2
      frappe/desk/reportview.py

+ 1
- 2
frappe/desk/reportview.py 查看文件

@@ -259,7 +259,7 @@ def get_stats(stats, doctype, filters=[]):
stats[tag] = scrub_user_tags(tagcount)
stats[tag].append([_("No Tags"), frappe.get_list(doctype,
fields=[tag, "count(*)"],
filters=filters +["({0} = ',' or {0} is null)".format(tag)], as_list=True)[0][1]])
filters=filters +["({0} = ',' or {0} = '' or {0} is null)".format(tag)], as_list=True)[0][1]])
else:
stats[tag] = tagcount

@@ -269,7 +269,6 @@ def get_stats(stats, doctype, filters=[]):
except MySQLdb.OperationalError:
# raised when _user_tags column is added on the fly
pass

return stats

@frappe.whitelist()


正在加载...
取消
保存