home · contact · privacy
Improve __eq__ of BaseModel to compare all saved attributes; plus minor refactorings.
[plomtask] / plomtask / todos.py
index d53674b6339679fa31ece5f78c0d871cfd90af01..ecdd599f2cd538acda5494fc5035e72e076b6730 100644 (file)
@@ -177,11 +177,11 @@ class Todo(BaseModel[int], ConditionsRelations):
                 potentially_enabled = set()
                 for child in step.children:
                     for condition in child.enables:
-                        potentially_enabled.add(condition)
+                        potentially_enabled.add(condition.id_)
                     children += [make_node(child)]
                 for condition in [c for c in step.conditions
                                   if (not c.is_active)
-                                  and (c not in potentially_enabled)]:
+                                  and (c.id_ not in potentially_enabled)]:
                     children += [make_node(condition)]
             else:
                 seen = step.id_ in seen_conditions