refs #4974 Config default branches and datasources

This commit is contained in:
Guillermo Bonet 2023-02-09 19:00:43 +01:00
parent c863737092
commit d7984bd915
1 changed files with 8 additions and 4 deletions

View File

@ -79,7 +79,8 @@ var App = {
'SELECT dsName FROM TblConfig',
'dsName', String
);
this.dsName = mdbDsName || Conf.defaultDatasource;
var userDefaultDatasource = this.regRead(Conf.regPath, 'defaultDatasource');
this.dsName = mdbDsName || userDefaultDatasource || Conf.defaultDatasource;
// Creates the necessary registry entries
var lastVersion = this.regRead(Conf.regPath, 'lastExecutedVersion');
@ -146,8 +147,11 @@ var App = {
'SELECT branch FROM tblVariables',
'branch', String
);
if (!branch)
branch = Conf.defaultBranch;
if (!branch) {
userDefaultBranch = this.regRead(Conf.regPath, 'defaultBranch');
branch = userDefaultBranch || Conf.defaultBranch;
}
this.$('branch').value = branch;
this.onChangeBranch();