check if cfg.Commons is nil

This commit is contained in:
Willy Kloucek committed 2022-05-16 09:32:12 +02:00
1 parent 382d91b22b
commit 97220e63e6
3 files changed
+3 -3

No files matched your search

@@ -97,7 +97,7 @@ func EnsureDefaults(cfg *config.Config) {
cfg.Metadata.SystemUserID = cfg.Commons.SystemUserID
}
if cfg.AdminUserID == "" {
if cfg.AdminUserID == "" && cfg.Commons != nil {
cfg.AdminUserID = cfg.Commons.AdminUserID
}
}