home
·
contact
·
privacy
projects
/
plomtask
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix Process.get_descendants eliminating sibling references to same Process.id_.
[plomtask]
/
plomtask
/
processes.py
diff --git
a/plomtask/processes.py
b/plomtask/processes.py
index ba9707be5c407116d1bdd13f0f9210147942b25e..4f97f62f8a8d55527d77b0f66c8719f5e0d2e66b 100644
(file)
--- a/
plomtask/processes.py
+++ b/
plomtask/processes.py
@@
-67,13
+67,13
@@
class Process:
return process
def get_descendants(self, db_conn: DatabaseConnection) ->\
return process
def get_descendants(self, db_conn: DatabaseConnection) ->\
-
dict[int,
dict[str, object]]:
+
list[
dict[str, object]]:
"""Return tree of descendant Processes"""
"""Return tree of descendant Processes"""
- descendants =
{}
+ descendants =
[]
for id_ in self.child_ids:
child = self.__class__.by_id(db_conn, id_)
for id_ in self.child_ids:
child = self.__class__.by_id(db_conn, id_)
- descendants
[id_] =
{'process': child,
- 'children': child.get_descendants(db_conn)}
+ descendants
+= [
{'process': child,
+ 'children': child.get_descendants(db_conn)}]
return descendants
def save(self, db_conn: DatabaseConnection) -> None:
return descendants
def save(self, db_conn: DatabaseConnection) -> None: