Update management/server/sqlite_store.go

This commit is contained in:
Misha Bragin
2024-04-17 20:53:11 +02:00
committed by GitHub
parent 9d1cb00570
commit 05993af7bf

View File

@@ -164,7 +164,7 @@ func (s *SqliteStore) SaveAccount(account *Account) error {
accCopy := account.Copy()
accCopy.SetupKeysG = make([]SetupKey, 0, len(accCopy.SetupKeys))
for _, key := range accCopy.SetupKeys {
//we need an explicit reference to the account as it is missing for some reason
//we need an explicit reference to the account for gorm
key.AccountID = accCopy.Id
accCopy.SetupKeysG = append(accCopy.SetupKeysG, *key)
}