

def __init__(self, request, *args, **kwargs):
    super(UpdateExternalConnectivityForm, self).__init__(request, *args, **kwargs)
    try:
        external_connectivity_id = self.initial['external_connectivity_id']
        external_connectivity = client.get_externalconnectivity(request, external_connectivity_id)
        self.fields['name'].initial = external_connectivity.name
        self.fields['description'].initial = external_connectivity.description
        self.fields['shared'].initial = external_connectivity.shared
    except Exception as e:
        msg = (_('Failed to retrive external connectivity details. %s') % str(e))
        LOG.debug(msg)

dataset/ETHPy150Open openstack/group-based-policy-ui/gbpui/panels/network_policy/forms.py UpdateExternalConnectivityForm.__init__/original