From 44bd7333748a43d88a62667ba2ca8627f9d76618 Mon Sep 17 00:00:00 2001 From: Bao Tran Date: Thu, 12 Dec 2024 15:44:48 -0500 Subject: [PATCH] fix: fix query to use packagepushrequest --- src/package/packagePushUpgrade.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/package/packagePushUpgrade.ts b/src/package/packagePushUpgrade.ts index e09abebbf..e776fca13 100644 --- a/src/package/packagePushUpgrade.ts +++ b/src/package/packagePushUpgrade.ts @@ -55,18 +55,12 @@ export function constructWhere(options?: PackagePushRequestListQueryOptions): st const where: string[] = []; if (options?.packageId) { - where.push(`Id = '${options.packageId}'`); + where.push(`MetadataPackageVersion.MetadataPackageId = '${options.packageId}'`); } - - // filter on errors - if (options?.status) { - where.push(`Status = '${options.status.toLowerCase()}'`); - } - return where.length > 0 ? `WHERE ${where.join(' AND ')}` : ''; } function getQuery(): string { - const QUERY = 'SELECT Id, Package2VersionId, Status, IsMigration' + 'FROM PackagePushRequest ' + '%s'; // WHERE, if applicable + const QUERY = 'SELECT Id, PackageVersion, Status' + 'FROM PackagePushRequest ' + '%s'; // WHERE, if applicable return QUERY; }