diff --git a/agenta-backend/agenta_backend/services/db_manager.py b/agenta-backend/agenta_backend/services/db_manager.py index 99080a13f7..306218cc57 100644 --- a/agenta-backend/agenta_backend/services/db_manager.py +++ b/agenta-backend/agenta_backend/services/db_manager.py @@ -1973,7 +1973,11 @@ async def list_human_evaluations(app_id: str): """ async with db_engine.get_session() as session: - base_query = select(HumanEvaluationDB).filter_by(app_id=uuid.UUID(app_id)) + base_query = ( + select(HumanEvaluationDB) + .filter_by(app_id=uuid.UUID(app_id)) + .filter(HumanEvaluationDB.testset_id.isnot(None)) + ) if isCloudEE(): query = base_query.options( joinedload(HumanEvaluationDB.user.of_type(UserDB)).load_only(UserDB.id, UserDB.username), # type: ignore