def delete(self, obj_id, commit=True): obj = self.get(url=obj_id) session.delete(obj) if commit: session.flush() session.commit() return obj
def delete(self, obj_id, commit=True): article = self.get(id=obj_id) self.remove_from_cluster(article) session.delete(article) return self.delete_only_article(article, commit=commit)
def delete_only_article(article, commit): session.delete(article) if commit: session.flush() session.commit() return article