#NEWLINE# def clean( self ) : #NEWLINE# #INDENT# cleaned_data = self . cleaned_data #NEWLINE# coordinators = cleaned_data . get ( 'coordinators' ) #NEWLINE# members = cleaned_data . get ( 'members' ) #NEWLINE# reviewers = cleaned_data . get ( 'reviewers' ) #NEWLINE# if ( coordinators and members ) : #NEWLINE# #INDENT# intersection = set ( coordinators ) . intersection ( members ) #NEWLINE# if intersection : #NEWLINE# #INDENT# users = [ User . objects . get ( pk = c ) . username for c in intersection ] #NEWLINE# raise forms . ValidationError ( ( _ ( 'User(s) %s cannot be in both Coordinators and Members lists. Please make sure that the lists are unique.' ) % ', ' . join ( users ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# if ( users and reviewers ) : #NEWLINE# #INDENT# intersection = set ( coordinators ) . intersection ( reviewers ) #NEWLINE# if intersection : #NEWLINE# #INDENT# users = [ User . objects . get ( pk = c ) . username for c in intersection ] #NEWLINE# raise forms . ValidationError ( ( _ ( 'User(s) %s cannot be in both Coordinators and Reviewers lists. Please make sure that the lists are unique.' ) % ', ' . join ( users ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return cleaned_data