From 72ed2eb91abfc5db06a318013b0d3807a2604721 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Thu, 8 Feb 2024 20:38:41 +0000 Subject: [PATCH] Fix bad test in tag check. (#738) Reviewed-on: https://git.vdb.to/cerc-io/stack-orchestrator/pulls/738 Co-authored-by: Thomas E Lackey Co-committed-by: Thomas E Lackey --- stack_orchestrator/deploy/webapp/util.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 6cdec448..80b477f9 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -355,11 +355,13 @@ def generate_hostname_for_app(app): def skip_by_tag(r, include_tags, exclude_tags): for tag in exclude_tags: - if tag and r.attributes.tags and tag in r.attributes.tags: + if r.attributes.tags and tag in r.attributes.tags: return True - for tag in include_tags: - if tag and (not r.attributes.tags or tag not in r.attributes.tags): - return True + if include_tags: + for tag in include_tags: + if r.attributes.tags and tag in r.attributes.tags: + return False + return True return False