mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 01:10:20 -06:00
don't init bundles to nil
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/config/defaults"
|
||||
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
|
||||
v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
|
||||
"github.com/owncloud/ocis/v2/services/settings/pkg/config"
|
||||
rdefaults "github.com/owncloud/ocis/v2/services/settings/pkg/store/defaults"
|
||||
)
|
||||
@@ -52,7 +53,7 @@ func DefaultConfig() *config.Config {
|
||||
StorageAddress: "127.0.0.1:9215",
|
||||
SystemUserIDP: "internal",
|
||||
},
|
||||
Bundles: nil,
|
||||
Bundles: []*v0.Bundle{},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,7 +123,7 @@ func EnsureDefaults(cfg *config.Config) {
|
||||
}
|
||||
|
||||
func Sanitize(cfg *config.Config) {
|
||||
if cfg.Bundles == nil {
|
||||
if len(cfg.Bundles) == 0 {
|
||||
cfg.Bundles = rdefaults.GenerateBundlesDefaultRoles()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user