mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-27 12:05:26 +00:00
fix: update tag in db if acl is enabled
This commit is contained in:
parent
09836cd150
commit
fcdc292647
@ -363,7 +363,7 @@ func (h *Headscale) UpdateMachine(machine *Machine) error {
|
|||||||
// SetTags takes a Machine struct pointer and update the forced tags.
|
// SetTags takes a Machine struct pointer and update the forced tags.
|
||||||
func (h *Headscale) SetTags(machine *Machine, tags []string) error {
|
func (h *Headscale) SetTags(machine *Machine, tags []string) error {
|
||||||
machine.ForcedTags = tags
|
machine.ForcedTags = tags
|
||||||
if err := h.UpdateACLRules(); !errors.Is(err, errEmptyPolicy) {
|
if err := h.UpdateACLRules(); err != nil && !errors.Is(err, errEmptyPolicy) {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
h.setLastStateChangeToNow(machine.Namespace.Name)
|
h.setLastStateChangeToNow(machine.Namespace.Name)
|
||||||
|
Loading…
Reference in New Issue
Block a user