diff options
author | SagarS <sagar.shetty@est.tech> | 2022-01-07 17:31:07 +0000 |
---|---|---|
committer | SagarS <sagar.shetty@est.tech> | 2022-01-10 10:41:35 +0000 |
commit | 33f78d6a26ab2f8116cf400faf66c8b8fa08793a (patch) | |
tree | 483a877d36d9b4496a2ee154c0208992961670d7 /components/pm-subscription-handler/pmsh_service | |
parent | 67df4303f5064b9d15581970857c20f3c818d23b (diff) |
[DCAEGEN2] PMSH Lazy loading error fix
Issue-ID: DCAEGEN2-3029
Change-Id: I06937d2268a1dbbacec7618d6b135ab2eba9cc5f
Signed-off-by: SagarS <sagar.shetty@est.tech>
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service')
-rw-r--r-- | components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py | 5 | ||||
-rw-r--r-- | components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py b/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py index 6d431473..ce463ed0 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py +++ b/components/pm-subscription-handler/pmsh_service/mod/api/services/nf_service.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2021 Nordix Foundation. +# Copyright (C) 2021-2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,7 +30,8 @@ def capture_filtered_nfs(sub_name): Args: sub_name (string): The name of subscription inorder to perform filtering Returns: - list[NetworkFunction]: a list of filtered NetworkFunction Objects. + list[NetworkFunction]: a list of filtered NetworkFunction Objects + or an empty list if no network function is filtered. """ logger.info(f'Getting filtered nfs for subscription: {sub_name}') nf_filter = NetworkFunctionFilter.get_network_function_filter(sub_name) diff --git a/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py b/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py index fc27f992..d9f44001 100644 --- a/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py +++ b/components/pm-subscription-handler/pmsh_service/mod/api/services/subscription_service.py @@ -1,5 +1,5 @@ # ============LICENSE_START=================================================== -# Copyright (C) 2021 Nordix Foundation. +# Copyright (C) 2021-2022 Nordix Foundation. # ============================================================================ # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -323,7 +323,8 @@ def query_all_subscriptions(): logger.info('Attempting to fetch all the subscriptions') subscriptions = db.session.query(SubscriptionModel) \ .options(joinedload(SubscriptionModel.network_filter), - joinedload(SubscriptionModel.measurement_groups)) \ + joinedload(SubscriptionModel.measurement_groups), + joinedload(SubscriptionModel.nfs)) \ .all() db.session.remove() return subscriptions |