Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/common/database/cosmosdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,11 @@ async def get_all_plans_by_team_id(self, team_id: str) -> List[Plan]:
return await self.query_items(query, parameters, Plan)


async def get_all_plans_by_team_id_status(self, team_id: str, status: str) -> List[Plan]:
async def get_all_plans_by_team_id_status(self, user_id: str,team_id: str, status: str) -> List[Plan]:
"""Retrieve all plans for a specific team."""
query = "SELECT * FROM c WHERE c.team_id=@team_id AND c.data_type=@data_type and c.user_id=@user_id and c.overall_status=@status ORDER BY c._ts DESC"
parameters = [
{"name": "@user_id", "value": self.user_id},
{"name": "@user_id", "value": user_id},
{"name": "@team_id", "value": team_id},
{"name": "@data_type", "value": DataType.plan},
{"name": "@status", "value": status},
Expand Down
2 changes: 1 addition & 1 deletion src/backend/common/database/database_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ async def get_all_plans_by_team_id(self, team_id: str) -> List[Plan]:

@abstractmethod
async def get_all_plans_by_team_id_status(
self, team_id: str, status: str
self, user_id:str, team_id: str, status: str
) -> List[Plan]:
"""Retrieve all plans for a specific team."""
pass
Expand Down
2 changes: 1 addition & 1 deletion src/backend/v3/api/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ async def get_plans(request: Request):
return []

all_plans = await memory_store.get_all_plans_by_team_id_status(
team_id=current_team.team_id, status=PlanStatus.completed
user_id=user_id, team_id=current_team.team_id, status=PlanStatus.completed
)

return all_plans
Expand Down
Loading