Merge pull request #839 from anandpdoshi/anand-september-11

[minor] fix in query report linked doctype
This commit is contained in:
Anand Doshi 2014-09-11 16:47:41 +05:30
commit aa01b3e38b
3 changed files with 15 additions and 2 deletions

View file

@ -89,7 +89,15 @@ def clear_notifications(user=None):
def delete_notification_count_for(doctype):
if frappe.flags.in_import: return
frappe.db.sql("""delete from `tabNotification Count` where for_doctype = %s""", (doctype,))
try:
frappe.db.sql("""delete from `tabNotification Count` where for_doctype = %s""", (doctype,))
except MySQLdb.OperationalError, e:
if e.args[0] != 1213:
raise
logger.error("Deadlock")
def clear_doctype_notifications(doc, method=None, *args, **kwargs):
if frappe.flags.in_import:

View file

@ -55,6 +55,11 @@ frappe.ui.form.Footer = Class.extend({
},
make_tags: function() {
if (this.frm.meta.issingle) {
this.wrapper.find(".form-tags").toggle(false);
return;
}
this.frm.tags = new frappe.ui.TagEditor({
parent: this.wrapper.find(".tag-area"),
frm: this.frm,

View file

@ -199,7 +199,7 @@ def get_linked_doctypes(columns, data):
# remove doctype if column is empty
for doctype, key in linked_doctypes.items():
if not any(d[key] for d in data):
if not any(d[key] for d in data if d):
del linked_doctypes[doctype]
return linked_doctypes