Skip to content

Commit

Permalink
Merge pull request #645 from jdufresne/unused
Browse files Browse the repository at this point in the history
Remove unused argument from _inter_tree_move_and_close_gap()
  • Loading branch information
craigds committed Apr 18, 2018
2 parents 0a292c8 + 2c5e727 commit 7d01aa4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions mptt/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -780,16 +780,11 @@ def _get_next_tree_id(self):

def _inter_tree_move_and_close_gap(
self, node, level_change,
left_right_change, new_tree_id, parent_pk=None):
left_right_change, new_tree_id):
"""
Removes ``node`` from its current tree, with the given set of
changes being applied to ``node`` and its descendants, closing
the gap left by moving ``node`` as it does so.
If ``parent_pk`` is ``None``, this indicates that ``node`` is
being moved to a brand new tree as its root node, and will thus
have its parent field set to ``NULL``. Otherwise, ``node`` will
have ``parent_pk`` set for its parent field.
"""
connection = self._get_connection(instance=node)
qn = connection.ops.quote_name
Expand Down Expand Up @@ -1026,10 +1021,8 @@ def _move_child_to_new_tree(self, node, target, position):
# Make space for the subtree which will be moved
self._create_space(tree_width, space_target, new_tree_id)
# Move the subtree
connection = self._get_connection(instance=node)
self._inter_tree_move_and_close_gap(
node, level_change, left_right_change, new_tree_id,
parent._meta.pk.get_db_prep_value(parent.pk, connection))
node, level_change, left_right_change, new_tree_id)

# Update the node to be consistent with the updated
# tree in the database.
Expand Down

0 comments on commit 7d01aa4

Please sign in to comment.