Skip to content

Commit

Permalink
tree: dummy operation not needed anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ergo committed Nov 24, 2016
1 parent a5f16d7 commit c4df994
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,6 @@ def delete_branch(cls, resource_id=None, db_session=None, *args, **kwargs):
DELETE FROM resources where resource_id in (select * from subtree);
""".format(tablename=tablename)
db_session = get_db_session(db_session)
# this is required to force transaction managers to mark the session
# as "dirty"
dummy = db_session.query(cls.model)
dummy.filter(cls.model.resource_id == None).delete(
synchronize_session=False)
text_obj = sa.text(raw_q)
db_session.execute(text_obj, params={'resource_id': resource_id})
cls.shift_ordering_down(parent_id, ordering, db_session=db_session)
Expand Down

0 comments on commit c4df994

Please sign in to comment.