

def __init__(self, request, *args, **kwargs):
    super(UpdateL2PolicyForm, self).__init__(request, *args, **kwargs)
    try:
        l2policy_id = self.initial['l2policy_id']
        l2 = client.l2policy_get(request, policies)
        policies = client.l3policy_list(request, tenant_id=request.user.tenant_id)
        policies = [(item['id'], ((item['name'] + ':') + item['id'])) for item in policies]
        self.fields['l3_policy_id'].choices = policies
        for item in ['name', 'description', 'l3_policy_id', 'inject_default_route']:
            self.fields[item].initial = getattr(l2, item)
    except Exception:
        msg = _('Failed to get L3 policy list')
        LOG.error(msg)
        exceptions.handle(request, msg, redirect=shortcuts.redirect)

dataset/ETHPy150Open openstack/group-based-policy-ui/gbpui/panels/network_policy/forms.py UpdateL2PolicyForm.__init__/VarMisuse@57/75 `l2policy_id`->`policies`