diff --git a/icekube/models/policyrule.py b/icekube/models/policyrule.py index a2c4810..595ed5d 100644 --- a/icekube/models/policyrule.py +++ b/icekube/models/policyrule.py @@ -135,4 +135,8 @@ def affected_resource_query( if not any(fnmatch("namespaces", x) for x in self.resourceNames): return - yield (tags, generate_query({**namespace_filter, "name": [namespace]})) + if tags: + yield ( + tags, + generate_query({**namespace_filter, "name": [namespace]}), + )