#NEWLINE# def _get_old_connections( facebook_id , current_user_id = None ) : #NEWLINE# #INDENT# '\n    Gets other accounts connected to this facebook id, which are not\n    attached to the current user\n    ' #NEWLINE# user_or_profile_model = get_model_for_attribute ( 'facebook_id' ) #NEWLINE# other_facebook_accounts = user_or_profile_model . objects . filter ( facebook_id = facebook_id ) #NEWLINE# kwargs = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if facebook_id : #NEWLINE# #INDENT# user_model = get_user_model ( ) #NEWLINE# if ( user_or_profile_model == user_model ) : #NEWLINE# #INDENT# kwargs [ 'id' ] = current_user_id #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# kwargs [ 'user' ] = current_user_id #NEWLINE# #UNINDENT# other_facebook_accounts = other_facebook_accounts . exclude ( ** kwargs ) #NEWLINE# #UNINDENT# return other_facebook_accounts