def has_comments_in_diffsets_excluding(review, diffset_pair):
 if (not review):
  return False
 (current_diffset, interdiff) = diffset_pair
 q = DiffSet.objects.filter(files__comments__review=review)
 q = q.filter(files__comments__interfilediff__isnull=True).distinct()
 if (not interdiff):
  q = q.exclude(pk=current_diffset.id)
 if (q.count() > 0):
  return True
 q = DiffSet.objects.filter(files__comments__review=review)
 q = q.filter(files__comments__interfilediff__isnull=False)
 if interdiff:
  q = q.exclude(pk=current_diffset.id, files__comments__interfilediff__diffset=interdiff)
 return (q.count() > 0)

def has_comments_in_diffsets_excluding ( review , diffset_pair ) : if ( not review ) : return False ( current_diffset , interdiff ) = diffset_pair q = DiffSet . objects . filter ( files__comments__review = review ) q = q . filter ( files__comments__interfilediff__isnull = True ) . distinct ( ) if ( not interdiff ) : q = q . exclude ( pk = current_diffset . id ) if ( q . count ( ) > 0 ) : return True q = DiffSet . objects . filter ( files__comments__review = review ) q = q . filter ( files__comments__interfilediff__isnull = False ) if interdiff : q = q . exclude ( pk = current_diffset . id , files__comments__interfilediff__diffset = interdiff ) return ( q . count ( ) > 0 )
returns whether the specified review has "other comments" .