From 2d0a7153e0d405b260498415942db9f23976ded8 Mon Sep 17 00:00:00 2001 From: pratik Date: Thu, 16 Nov 2023 19:42:19 +0530 Subject: [PATCH] fix for archive state not working in QA testing --- backend/packages/Upgrade/src/api/services/QueryService.ts | 8 ++++++-- .../experiment-status/experiment-status.component.ts | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/backend/packages/Upgrade/src/api/services/QueryService.ts b/backend/packages/Upgrade/src/api/services/QueryService.ts index e349d1eecb..bb913ce101 100644 --- a/backend/packages/Upgrade/src/api/services/QueryService.ts +++ b/backend/packages/Upgrade/src/api/services/QueryService.ts @@ -68,8 +68,12 @@ export class QueryService { const experiments: Experiment[] = []; // checks for archieve state experiment - if (promiseResult[0].experiment?.state === EXPERIMENT_STATE.ARCHIVED) { - return this.getArchivedStats(queryIds, logger); + if (queryIds.length !== 0) { + if (promiseResult[0].experiment?.state === EXPERIMENT_STATE.ARCHIVED) { + return this.getArchivedStats(queryIds, logger); + } + } else { + return []; } const analyzePromise = promiseResult.map((query) => { diff --git a/frontend/projects/upgrade/src/app/features/dashboard/home/components/modal/experiment-status/experiment-status.component.ts b/frontend/projects/upgrade/src/app/features/dashboard/home/components/modal/experiment-status/experiment-status.component.ts index 8803dc5183..b6d50a6672 100644 --- a/frontend/projects/upgrade/src/app/features/dashboard/home/components/modal/experiment-status/experiment-status.component.ts +++ b/frontend/projects/upgrade/src/app/features/dashboard/home/components/modal/experiment-status/experiment-status.component.ts @@ -118,6 +118,6 @@ export class ExperimentStatusComponent implements OnInit { } setArchivedStatusAgreement() { - this.archivedStatusAgreement = true; + this.archivedStatusAgreement = !this.archivedStatusAgreement; } }