From fcdc292647cf74aebfdd0fc1fe3d6c850f0c65e7 Mon Sep 17 00:00:00 2001 From: Adrien Raffin-Caboisse Date: Fri, 13 May 2022 13:00:32 +0200 Subject: [PATCH] fix: update tag in db if acl is enabled --- machine.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/machine.go b/machine.go index caf1a59..ff5d4c2 100644 --- a/machine.go +++ b/machine.go @@ -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)