Fix pointer in machine save call

This commit is contained in:
Kristoffer Dalby 2022-05-31 10:05:00 +02:00
parent a09633e859
commit 5ecfbbaf5d
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ func (s *IntegrationCLITestSuite) SetupTest() {
} }
headscaleOptions := &dockertest.RunOptions{ headscaleOptions := &dockertest.RunOptions{
Name: "headscale", Name: "headscale-cli",
Mounts: []string{ Mounts: []string{
fmt.Sprintf("%s/integration_test/etc:/etc/headscale", currentPath), fmt.Sprintf("%s/integration_test/etc:/etc/headscale", currentPath),
}, },

View file

@ -772,7 +772,7 @@ func (h *Headscale) RegisterMachine(machine Machine,
machine.IPAddresses = ips machine.IPAddresses = ips
if err := h.db.Save(machine).Error; err != nil { if err := h.db.Save(&machine).Error; err != nil {
return nil, fmt.Errorf("failed register(save) machine in the database: %w", err) return nil, fmt.Errorf("failed register(save) machine in the database: %w", err)
} }