7915: Prevent user creating a cycle in the place hierarchy
This commit is contained in:
parent
8de7d287b7
commit
8ffa78ad19
@ -74,9 +74,10 @@ class EditPlaceRef(EditSecondary):
|
||||
skip = [handle]
|
||||
while todo:
|
||||
handle = todo.pop()
|
||||
for child in self.dbstate.db.find_place_child_handles(handle):
|
||||
todo.append(child)
|
||||
skip.append(child)
|
||||
for child in self.db.find_backlink_handles(handle, ['Place']):
|
||||
if child[1] not in skip:
|
||||
todo.append(child[1])
|
||||
skip.append(child[1])
|
||||
return skip
|
||||
|
||||
def select_parent(self, button):
|
||||
|
Loading…
Reference in New Issue
Block a user