mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
Update management/server/sqlite_store.go
This commit is contained in:
@@ -172,7 +172,7 @@ func (s *SqliteStore) SaveAccount(account *Account) error {
|
|||||||
accCopy.PeersG = make([]nbpeer.Peer, 0, len(accCopy.Peers))
|
accCopy.PeersG = make([]nbpeer.Peer, 0, len(accCopy.Peers))
|
||||||
for id, peer := range accCopy.Peers {
|
for id, peer := range accCopy.Peers {
|
||||||
peer.ID = id
|
peer.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
|
||||||
peer.AccountID = accCopy.Id
|
peer.AccountID = accCopy.Id
|
||||||
accCopy.PeersG = append(accCopy.PeersG, *peer)
|
accCopy.PeersG = append(accCopy.PeersG, *peer)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user