def save(self, doc):
        if doc.id:
            return self.update(doc)
        else:
            return self.insert(doc)
def delete_comment(self):
        "Delete the selected comment"

        if self.get_selected_item()['type'] == 'Comment':
            self.delete_item()
        else:
            self.term.flash()