Skip to content

Commit 0a32483

Browse files
committed
fix
1 parent 90ae983 commit 0a32483

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/cubejs-api-gateway/src/gateway.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,12 +625,13 @@ class ApiGateway {
625625
const compilerApi = await this.getCompilerApi(context);
626626
const preAggregations = await compilerApi.preAggregations();
627627

628+
const timezones = this.scheduledRefreshTimeZones ? await this.scheduledRefreshTimeZones(context) : [];
628629
const preAggregationPartitions = await this.refreshScheduler()
629630
.preAggregationPartitions(
630631
context,
631632
normalizeQueryPreAggregations(
632633
{
633-
timezones: this.scheduledRefreshTimeZones ? this.scheduledRefreshTimeZones(context) : [],
634+
timezones: timezones.length > 0 ? timezones : undefined,
634635
preAggregations: preAggregations.map(p => ({
635636
id: p.id,
636637
cacheOnly,
@@ -652,9 +653,10 @@ class ApiGateway {
652653
) {
653654
const requestStarted = new Date();
654655
try {
656+
const timezones = this.scheduledRefreshTimeZones ? await this.scheduledRefreshTimeZones(context) : [];
655657
query = normalizeQueryPreAggregations(
656658
this.parseQueryParam(query),
657-
{ timezones: this.scheduledRefreshTimeZones ? this.scheduledRefreshTimeZones(context) : [] }
659+
{ timezones: timezones.length > 0 ? timezones : undefined }
658660
);
659661
const orchestratorApi = await this.getAdapterApi(context);
660662
const compilerApi = await this.getCompilerApi(context);

0 commit comments

Comments
 (0)