summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py')
-rwxr-xr-xcomponents/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
index 7b91a307..a5fc86e6 100755
--- a/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
+++ b/components/pm-subscription-handler/pmsh_service/mod/pmsh_utils.py
@@ -128,10 +128,7 @@ class AppConfig:
sub_data = self.subscription.__dict__
validate(instance=sub_data, schema=self.sub_schema)
nf_filter = sub_data["nfFilter"]
- for filter_name in nf_filter:
- if len(nf_filter[filter_name]) > 0:
- break
- else:
+ if not [filter_name for filter_name, val in nf_filter.items() if len(val) > 0]:
raise ValidationError("At least one filter within nfFilter must not be empty")
logger.debug("Subscription schema is valid.")