1. angri
  2. sqlamp

Commits

angri  committed 8d1e0e3

avoid unneeded queries when moving roots

  • Participants
  • Parent commits adee794
  • Branches default

Comments (0)

Files changed (1)

File sqlamp/__init__.py

View file
         )
 
     def _pull_nodes(self, up_or_down, session, tree_id, from_path, depth):
+        if depth == 0:
+            # roots have no siblings, nothing to pull in either direction
+            return
+
         opts = self._mp_opts
 
         # TODO: move this to MPOptions.filter_siblings_after()