From a7026613173f605c27fece7f06db5a6c8d13418d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Fri, 20 Mar 2015 15:12:34 +0530 Subject: [PATCH] Fix: Comment in single doctype --- frappe/core/doctype/comment/comment.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/frappe/core/doctype/comment/comment.py b/frappe/core/doctype/comment/comment.py index 95d27618ef..e17b1d18df 100644 --- a/frappe/core/doctype/comment/comment.py +++ b/frappe/core/doctype/comment/comment.py @@ -60,6 +60,8 @@ class Comment(Document): raise def update_comments_in_parent(self, _comments): + if frappe.db.get_value("DocType", self.comment_doctype, "issingle"): + return # use sql, so that we do not mess with the timestamp frappe.db.sql("""update `tab%s` set `_comments`=%s where name=%s""" % (self.comment_doctype, "%s", "%s"), (json.dumps(_comments), self.comment_docname))