#NEWLINE# def set_as_primary( self , conditional = False ) : #NEWLINE# #INDENT# old_primary = EmailAddress . objects . get_primary ( old_primary . user ) #NEWLINE# if old_primary : #NEWLINE# #INDENT# if conditional : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# old_primary . primary = False #NEWLINE# old_primary . save ( ) #NEWLINE# #UNINDENT# self . primary = True #NEWLINE# self . save ( ) #NEWLINE# self . user . email = self . email #NEWLINE# self . user . save ( ) #NEWLINE# return True