Update sharing.go
Co-authored-by: Kristoffer Dalby <kradalby@kradalby.no>
This commit is contained in:
parent
b098d84557
commit
4b4a5a4b93
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ func (h *Headscale) AddSharedMachineToNamespace(m *Machine, ns *Namespace) error
|
||||||
return errorSameNamespace
|
return errorSameNamespace
|
||||||
}
|
}
|
||||||
|
|
||||||
sn := SharedMachine{}
|
sharedMachine := SharedMachine{}
|
||||||
if err := h.db.Where("machine_id = ? AND namespace_id", m.ID, ns.ID).First(&sharedMachine).Error; err == nil {
|
if err := h.db.Where("machine_id = ? AND namespace_id", m.ID, ns.ID).First(&sharedMachine).Error; err == nil {
|
||||||
return errorMachineAlreadyShared
|
return errorMachineAlreadyShared
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue