mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-01 19:14:35 +02:00
Prevent plugin from crashing if SiteURL is not set (#677)
* Prevent plugin from crashing if SiteURL is not set * Change default baseURL to be . instead of empty string * Revert "Change default baseURL to be . instead of empty string" This reverts commit cceb3801679b65bb14336e91909ea4b02f448903.
This commit is contained in:
parent
6e214ebc3d
commit
4328375324
@ -99,8 +99,13 @@ func (p *Plugin) OnActivate() error {
|
||||
return fmt.Errorf("error initializing the DB: %v", err)
|
||||
}
|
||||
|
||||
baseURL := ""
|
||||
if mmconfig.ServiceSettings.SiteURL != nil {
|
||||
baseURL = *mmconfig.ServiceSettings.SiteURL
|
||||
}
|
||||
|
||||
cfg := &config.Configuration{
|
||||
ServerRoot: *mmconfig.ServiceSettings.SiteURL + "/plugins/focalboard",
|
||||
ServerRoot: baseURL + "/plugins/focalboard",
|
||||
Port: -1,
|
||||
DBType: *mmconfig.SqlSettings.DriverName,
|
||||
DBConfigString: *mmconfig.SqlSettings.DataSource,
|
||||
@ -174,7 +179,7 @@ func defaultLoggingConfig() string {
|
||||
"delim": " ",
|
||||
"min_level_len": 5,
|
||||
"min_msg_len": 40,
|
||||
"enable_color": true
|
||||
"enable_color": true
|
||||
},
|
||||
"levels": [
|
||||
{"id": 5, "name": "debug"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user