Fix deleting comments already deleted

This commit is contained in:
Noah 2017-01-02 20:04:22 -08:00
parent 84d5b4a2cd
commit 8dbee56b38

View File

@ -155,8 +155,9 @@ def update_comment(thread, cid, data):
def delete_comment(thread, cid): def delete_comment(thread, cid):
"""Delete a comment from a thread.""" """Delete a comment from a thread."""
comments = get_comments(thread) comments = get_comments(thread)
del comments[cid] if cid in comments:
write_comments(thread, comments) del comments[cid]
write_comments(thread, comments)
def make_quick_delete_token(thread, cid): def make_quick_delete_token(thread, cid):