fix: don't detect graphite version before it's saved

This commit is contained in:
Torkel Ödegaard 2017-12-12 15:28:41 +01:00
parent cfd755eb93
commit de91d68402
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,3 @@
///<reference path="../../headers/common.d.ts" />
import _ from 'lodash';
import config from 'app/core/config';

View File

@ -15,6 +15,10 @@ export class GraphiteConfigCtrl {
}
autoDetectGraphiteVersion() {
if (!this.current.id) {
return;
}
this.datasourceSrv.loadDatasource(this.current.name)
.then((ds) => {
return ds.getVersion();