mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-25 07:54:46 +00:00
delete answer when question is deleted
This commit is contained in:
8
knowledge_base/doctype/question/question.py
Normal file
8
knowledge_base/doctype/question/question.py
Normal file
@@ -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)
|
||||||
|
|
||||||
Reference in New Issue
Block a user