def check_SOA_condition(self):
        """We need to check if the domain is the root domain in a zone.
        If the domain is the root domain, it will have an soa, but the
        master domain will have no soa (or it will have a a different
        soa).
        """
        try:
            self.domain
        except __HOLE__:
            return  # Validation will fail eventually
        if not self.domain.soa:
            return
        root_domain = self.domain.soa.root_domain
        if root_domain is None:
            return
        if self.fqdn == root_domain.name:
            raise ValidationError("You cannot create a CNAME who's left hand "
                                  "side is at the same level as an SOA")
dataset/ETHPy150Open rtucker-mozilla/mozilla_inventory/mozdns/cname/models.py/CNAME.check_SOA_condition