diff options
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 |