Skip to content

Commit 0a3dbdf

Browse files
committed
PM-1038 - fix search by externalid
1 parent 68e8c6a commit 0a3dbdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/api/admin-winning/adminWinning.service.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ export class AdminWinningService {
5959
let query;
6060
let orderBy;
6161

62-
if (body.externalIds && body.externalIds.length > 0) {
63-
query = this.getQueryByExternalIDs(body);
64-
orderBy = this.getOrderByWithExternalIDs(body);
65-
} else if (winnerIds) {
62+
if (winnerIds?.length) {
6663
query = this.getQueryByWinnerId(body, winnerIds);
6764
orderBy = this.getOrderByWithWinnerId(body);
65+
} else if (body.externalIds && body.externalIds.length > 0) {
66+
query = this.getQueryByExternalIDs(body);
67+
orderBy = this.getOrderByWithExternalIDs(body);
6868
} else {
6969
query = this.getQueryByWinnerId(body, undefined);
7070
orderBy = this.getOrderByWithExternalIDs(body);

0 commit comments

Comments
 (0)