Update management/server/sqlite_store.go

This commit is contained in:
Misha Bragin
2024-04-17 20:55:01 +02:00
committed by GitHub
parent db34162733
commit 89383b7f01

View File

@@ -201,7 +201,7 @@ func (s *SqliteStore) SaveAccount(account *Account) error {
accCopy.RoutesG = make([]route.Route, 0, len(accCopy.Routes))
for id, route := range accCopy.Routes {
route.ID = id
//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
route.AccountID = accCopy.Id
accCopy.RoutesG = append(accCopy.RoutesG, *route)
}