Update management/server/sqlite_store.go

This commit is contained in:
Misha Bragin 2024-04-17 20:55:32 +02:00 committed by GitHub
parent 89383b7f01
commit 515ce9e3af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -209,7 +209,7 @@ func (s *SqliteStore) SaveAccount(account *Account) error {
accCopy.NameServerGroupsG = make([]nbdns.NameServerGroup, 0, len(accCopy.NameServerGroups))
for id, ns := range accCopy.NameServerGroups {
ns.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
ns.AccountID = accCopy.Id
accCopy.NameServerGroupsG = append(accCopy.NameServerGroupsG, *ns)
}