fix: look for goals in steps rather than plans
small bugfix, we used to look for goals in plans, but they are part of a plan. ref: N25B-400
This commit is contained in:
@@ -198,9 +198,9 @@ class BDIProgramManager(BaseAgent):
|
||||
:return: All goals within and including the given goal.
|
||||
"""
|
||||
goals: list[Goal] = [goal]
|
||||
for plan in goal.plan:
|
||||
if isinstance(plan, Goal):
|
||||
goals.extend(BDIProgramManager._extract_goals_from_goal(plan))
|
||||
for step in goal.plan.steps:
|
||||
if isinstance(step, Goal):
|
||||
goals.extend(BDIProgramManager._extract_goals_from_goal(step))
|
||||
return goals
|
||||
|
||||
def _extract_current_goals(self) -> list[Goal]:
|
||||
|
||||
Reference in New Issue
Block a user