From cd80d6381e8519bf7566c5c757be7195339c936f Mon Sep 17 00:00:00 2001 From: AndyWalshe Date: Thu, 12 Mar 2020 15:57:39 +0000 Subject: Commit pnf deletion to database in PMSH Issue-ID: DCAEGEN2-2142 Signed-off-by: AndyWalshe Change-Id: Ib4945174aec490d1149903c01f64fc5dd5e19496 --- .../pm-subscription-handler/pmsh_service/mod/network_function.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'components/pm-subscription-handler/pmsh_service') 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() -- cgit 1.2.3-korg