From a06a6b6517141cd6ca2bfa3bf7696cccde7ffd2b Mon Sep 17 00:00:00 2001 From: Sven Klemm Date: Thu, 30 Aug 2018 14:25:27 +0200 Subject: [PATCH] fix timecolumn handling when table changes --- public/app/plugins/datasource/postgres/query_ctrl.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/public/app/plugins/datasource/postgres/query_ctrl.ts b/public/app/plugins/datasource/postgres/query_ctrl.ts index 24ed083ec21..3e64e1a7df5 100644 --- a/public/app/plugins/datasource/postgres/query_ctrl.ts +++ b/public/app/plugins/datasource/postgres/query_ctrl.ts @@ -209,17 +209,15 @@ export class PostgresQueryCtrl extends QueryCtrl { this.timeColumnSegment.html = segment.html; this.timeColumnSegment.value = segment.value; - this.target.where = []; - this.target.updatePersistedParts(); this.timeColumnChanged(); } } }); this.datasource.metricFindQuery(this.metaBuilder.buildColumnQuery('value')).then(result => { - // check if value columns are still valid if (result.length > 0) { this.target.select = [[{ type: 'column', params: [result[0].text] }]]; + this.target.where = []; this.target.group = []; } this.updateProjection();