[fix] Update comments in parent doctype if comment_doctype mentioned

This commit is contained in:
Nabin Hait 2015-06-22 09:02:04 +05:30
parent f7016664cc
commit c641d51158

View file

@ -101,7 +101,7 @@ class Comment(Document):
"""Updates `_comments` property in parent Document with given dict.
:param _comments: Dict of comments."""
if frappe.db.get_value("DocType", self.comment_doctype, "issingle"):
if not self.comment_doctype or frappe.db.get_value("DocType", self.comment_doctype, "issingle"):
return
# use sql, so that we do not mess with the timestamp