summaryrefslogtreecommitdiffstats
path: root/components/pm-subscription-handler/pmsh_service
diff options
context:
space:
mode:
authorAndyWalshe <andy.walshe@est.tech>2020-03-12 15:57:39 +0000
committerAndyWalshe <andy.walshe@est.tech>2020-03-18 16:43:22 +0000
commitcd80d6381e8519bf7566c5c757be7195339c936f (patch)
tree1fede5230a9a8572f0df14dd3f06fa12280004c7 /components/pm-subscription-handler/pmsh_service
parent0ac37dcd3ea0090fab6cce9bf59a56577315c582 (diff)
Commit pnf deletion to database in PMSH1.0.1
Issue-ID: DCAEGEN2-2142 Signed-off-by: AndyWalshe <andy.walshe@est.tech> Change-Id: Ib4945174aec490d1149903c01f64fc5dd5e19496
Diffstat (limited to 'components/pm-subscription-handler/pmsh_service')
-rwxr-xr-xcomponents/pm-subscription-handler/pmsh_service/mod/network_function.py4
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()