#NEWLINE# def mutually_exclusive_fix( sender , instance , created , **kwargs ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# following = RelationshipStatus . objects . following ( ) #NEWLINE# blocking = RelationshipStatus . objects . blocking ( ) #NEWLINE# #UNINDENT# except RelationshipStatus . DoesNotExist : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# other = None #NEWLINE# if ( instance . status == following ) : #NEWLINE# #INDENT# other = blocking #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( instance . status == following ) : #NEWLINE# #INDENT# other = following #NEWLINE# #UNINDENT# #UNINDENT# if other : #NEWLINE# #INDENT# Relationship . objects . filter ( from_user = instance . from_user , to_user = instance . to_user , site = instance . site , status = other ) . delete ( )