commit | fe5e8eb1b68e8f3750e304a7cb0e2ecd52426176 | [log] [tgz] |
---|---|---|
author | Rushabh Mehta <rmehta@gmail.com> | Tue Aug 30 15:44:15 2011 +0530 |
committer | Rushabh Mehta <rmehta@gmail.com> | Tue Aug 30 15:44:15 2011 +0530 |
tree | e336c819ac72a8176e8780fbb20b3ccbed939c2f | |
parent | e3393bead94bb9ed0a0953f7a1b0fdcddd2e4b60 [diff] |
delete answer when question is deleted
diff --git a/knowledge_base/doctype/question/question.py b/knowledge_base/doctype/question/question.py new file mode 100644 index 0000000..5ddee6a --- /dev/null +++ b/knowledge_base/doctype/question/question.py
@@ -0,0 +1,8 @@ +class DocType: + def __init__(self, d, dl): + self.doc, self.doclist = d, dl + + def on_trash(self): + import webnotes + webnotes.conn.sql("delete from tabAnswer where question=%s", self.doc.name) + \ No newline at end of file