Unable to update PTG if NSP is associated

We were getting this failure because of
incorrect query for Network service policy
from form context

Closes-Bug:  #1503833

Change-Id: Ic8f565cb6bb05bef8e4fb9cdf70acb85a88a8c3c
(cherry picked from commit 26ccad1549)
(cherry picked from commit f49fbeb021)
This commit is contained in:
ank 2015-10-26 14:07:03 +05:30
parent daff023ab4
commit 7e33141e9d
1 changed files with 1 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class UpdatePolicyTargetForm(forms.SelfHandlingForm):
for i in context['consumed_policy_rule_sets']])
else:
context['consumed_policy_rule_sets'] = None
if context['network_service_policy_id'] == 'None':
if context.get('network_service_policy_id') == 'None':
context['network_service_policy_id'] = None
if context.get('name'):
context['name'] = html.escape(context['name'])