skip set tags if none to set

This commit is contained in:
Oliver Gorwits
2023-07-19 17:46:20 +01:00
parent 04ee1e1613
commit 0378e01af7

View File

@@ -26,6 +26,7 @@ register_worker({ phase => 'main' }, sub {
push @tags_to_set, $tag;
}
return unless scalar @tags_to_set;
$device->update({ tags => \@tags_to_set });
debug sprintf ' [%s] properties - set %s tag%s',
$device->ip, scalar @tags_to_set, (scalar @tags_to_set > 1);