#NEWLINE# def check_SOA_condition( self ) : #NEWLINE# #INDENT# 'We need to check if the domain is the root domain in a zone.\n        If the domain is the root domain, it will have an soa, but the\n        master domain will have no soa (or it will have a a different\n        soa).\n        ' #NEWLINE# try : #NEWLINE# #INDENT# root_domain . domain #NEWLINE# #UNINDENT# except ObjectDoesNotExist : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( not self . domain . soa ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# root_domain = self . domain . soa . root_domain #NEWLINE# if ( root_domain is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if ( self . fqdn == root_domain . name ) : #NEWLINE# #INDENT# raise ValidationError ( "You cannot create a CNAME who's left hand side is at the same level as an SOA" )