'Helper internal method to actually find the microsite configuration'

def _set_microsite_config_from_obj(self, subdomain, domain, microsite_object):

    config = microsite_object.values
    config['subdomain'] = strip_port_from_host(subdomain)
    config['site_domain'] = strip_port_from_host(domain)
    config['microsite_config_key'] = microsite_object.key
    organizations = microsite_object.get_organizations()
    if (not organizations):
        raise Exception('Configuration    error.    Microsite    {key}    does    not    have    any    ORGs    mapped    to    it!'.format(key=microsite_object.key))
    config['course_org_filter'] = organizations[0]
    self.current_request_configuration.data = config
