Skip to content

Commit 78b7803

Browse files
authored
[forward fix] Fix addtional where with brackets (#7476)
add bracket to handle situation when no operator name is set, if not this will fetch all commits in benchmark
1 parent 39523dd commit 78b7803

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

torchci/lib/benchmark/api_helper/backend/dataFetchers/queryBuilderUtils/listCommitQueryBuilder.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ export class PytorchOperatorMicroListCommitsDataFetcher
107107
super();
108108
this._data_query = new BenchmarkListCommitQueryBuilder();
109109
this._data_query.addWhere([
110-
"startsWith(model_name, {operatorName: String}) OR {operatorName: String} = ''",
110+
"(startsWith(model_name, {operatorName: String}) OR {operatorName: String} = '')",
111111
]);
112112
}
113113

114114
toQueryParams(inputs: any, id?: string): Record<string, any> {
115-
return this._data_query.toQueryParams(inputs);
115+
const params = this._data_query.toQueryParams(inputs);
116+
return params;
116117
}
117118

118119
build() {

0 commit comments

Comments
 (0)