Example #1
0
 def delete(self, obj_id, commit=True):
     obj = self.get(url=obj_id)
     session.delete(obj)
     if commit:
         session.flush()
         session.commit()
     return obj
Example #2
0
 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)
Example #3
0
 def delete_only_article(article, commit):
     session.delete(article)
     if commit:
         session.flush()
         session.commit()
     return article