(cls, source_domain)
return list(set(config.domains) - {config.source_domain})
Get a list of domains, if any, controlled by the given source domain.
Get a list of domains, if any, controlled by the given source domain.
Get a list of domains if any controlled by the given source domain .
def get_domains(cls, source_domain):
        """
        Get a list of domains, if any, controlled by the given source domain.
        """
        try:
            config = cls.objects.get(is_enabled=True, source_domain=source_domain)
        except cls.DoesNotExist:
            return []
        return list(set(config.domains) - {config.source_domain})
def get_domains ( cls , source_domain ) : try : config = cls . objects . get ( is_enabled = True , source_domain = source_domain ) except cls . DoesNotExist : return [ ] return list ( set ( config . domains ) - { config . source_domain } )