#NEWLINE# def clean_site_code( self ) : #NEWLINE# #INDENT# site_code = site_code . cleaned_data [ 'site_code' ] #NEWLINE# if site_code : #NEWLINE# #INDENT# site_code = site_code . lower ( ) #NEWLINE# #UNINDENT# if SQLLocation . objects . filter ( domain = self . location . domain , site_code__iexact = site_code ) . exclude ( location_id = self . location . location_id ) . exists ( ) : #NEWLINE# #INDENT# raise forms . ValidationError ( 'another location already uses this site code' ) #NEWLINE# #UNINDENT# return site_code