diff options
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service/mod')
-rwxr-xr-x | components/pm-subscription-handler/pmsh_service/mod/network_function.py | 4 |
1 files changed, 3 insertions, 1 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 c4b9b56c..2150dc28 100755 --- a/components/pm-subscription-handler/pmsh_service/mod/network_function.py +++ b/components/pm-subscription-handler/pmsh_service/mod/network_function.py @@ -82,4 +82,6 @@ class NetworkFunction: nf = NetworkFunctionModel.query.filter( NetworkFunctionModel.nf_name == nf_name).one_or_none() - db.session.delete(nf) if nf else None + if nf: + db.session.delete(nf) + db.session.commit() |