def handle(self, request, context):
        url = reverse('horizon:project:application_policy:index')
        try:
            policyclassifier_id = self.initial['policyclassifier_id']
            protocol = context.get('protocol').lower()
            if protocol in PROTOCOL_MAP:
                context['protocol'] = PROTOCOL_MAP[protocol]
            elif protocol == "any":
                context['protocol'] = None
            if 'port_range' in context and context['port_range'] == '':
                context['port_range'] = None
            if context.get('name'):
                context['name'] = html.escape(context['name'])
            if context.get('description'):
                context['description'] = html.escape(context['description'])
            client.policyclassifier_update(self.request,
                    policyclassifier_id, **context)
            messages.success(
                request, _('Policy classifier successfully updated.'))
            return http.HttpResponseRedirect(url)
        except Exception:
            exceptions.handle(
                request, _("Unable to update policy classifier."),
                redirect=url)
dataset/ETHPy150Open openstack/group-based-policy-ui/gbpui/panels/application_policy/forms.py/UpdatePolicyClassifierForm.handle/original