fix: update tag in db if acl is enabled

This commit is contained in:
Adrien Raffin-Caboisse 2022-05-13 13:00:32 +02:00
parent 09836cd150
commit fcdc292647
No known key found for this signature in database
GPG Key ID: 7FB60532DEBEAD6A
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ func (h *Headscale) UpdateMachine(machine *Machine) error {
// SetTags takes a Machine struct pointer and update the forced tags.
func (h *Headscale) SetTags(machine *Machine, tags []string) error {
machine.ForcedTags = tags
if err := h.UpdateACLRules(); !errors.Is(err, errEmptyPolicy) {
if err := h.UpdateACLRules(); err != nil && !errors.Is(err, errEmptyPolicy) {
return err
}
h.setLastStateChangeToNow(machine.Namespace.Name)