#NEWLINE# def has_joins( queryset ) : #NEWLINE# #INDENT# 'Return True iff. a queryset includes joins.\n\n    If this is the case, it is possible for the queryset\n    to return duplicate results.\n    ' #NEWLINE# for join in six . itervalues ( queryset . query . alias_map ) : #NEWLINE# #INDENT# if join . join_type : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# #UNINDENT# return False