diff options
author | efiacor <fiachra.corcoran@est.tech> | 2020-05-20 15:18:41 +0100 |
---|---|---|
committer | efiacor <fiachra.corcoran@est.tech> | 2020-05-25 08:50:24 +0100 |
commit | 5ed9b7d3cad56c6438bca305b6d2931bd320352b (patch) | |
tree | b05cbb4e7215e9b6b9aead2a1ae45d63330c0761 /components/pm-subscription-handler/pmsh_service/mod/network_function.py | |
parent | 9a57e9a2e2357f267c6a7c804488011ac97beab5 (diff) |
[PMSH] Adding 'subscriptions' api endpoint
Signed-off-by: efiacor <fiachra.corcoran@est.tech>
Change-Id: I837045b3b618a98d4aabe190359d0ad47f27ca9f
Issue-ID: DCAEGEN2-2154
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod/network_function.py')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/mod/network_function.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/pm-subscription-handler/pmsh_service/mod/network_function.py b/components/pm-subscription-handler/pmsh_service/mod/network_function.py index bf223184..0663be08 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/network_function.py +++ b/components/pm-subscription-handler/pmsh_service/mod/network_function.py @@ -20,7 +20,7 @@ import re from enum import Enum from mod import pmsh_logging as logger, db -from mod.db_models import NetworkFunctionModel +from mod.api.db_models import NetworkFunctionModel class NetworkFunction: @@ -53,10 +53,9 @@ class NetworkFunction: orchestration_status=self.orchestration_status) db.session.add(new_nf) db.session.commit() - return new_nf else: - logger.debug(f'Network function {existing_nf} already exists,' + logger.debug(f'Network function {existing_nf.nf_name} already exists,' f' returning this network function..') return existing_nf |