fix to kb, delete question, ans

This commit is contained in:
Rushabh Mehta
2011-08-30 15:37:46 +05:30
parent 385a3792e1
commit e3393bead9
4 changed files with 37 additions and 10 deletions

View File

@@ -35,3 +35,11 @@ def vote(arg):
(p, cstr(res[1]) + ',' + webnotes.user.name, args['dn']))
return p
def delete(arg):
"""
delete a question or answer (called from kb toolbar)
"""
args = load_json(arg)
from webnotes.model import delete_doc
delete_doc(args['dt'], args['dn'])