#NEWLINE# def friendship_invitation( sender , instance , **kwargs ) : #NEWLINE# #INDENT# friendship_invitations = FriendshipInvitation . objects . filter ( to_user = instance . to_user , from_user = instance . from_user ) #NEWLINE# for friendship_invitation in friendship_invitations : #NEWLINE# #INDENT# FriendshipInvitationHistory . objects . create ( from_user = friendship_invitation . from_user , to_user = friendship_invitation . to_user , message = friendship_invitation . message , sent = friendship_invitation . sent , status = friendship_invitation . status ) #NEWLINE# friendship_invitation . delete ( )