add additional check after datastore init if the key was newly generated and needs to be written to config

This commit is contained in:
Pascal Fischer 2023-09-27 14:48:40 +02:00
parent aa1d31bde6
commit ab849f0942

View File

@ -148,7 +148,7 @@ var (
return fmt.Errorf("failed to initialize database: %s", err)
}
if key != "" {
if config.DataStoreEncryptionKey != key {
log.Infof("update config with activity store key")
config.DataStoreEncryptionKey = key
err := updateMgmtConfig(mgmtConfig, config)