#NEWLINE# def clean( self ) : #NEWLINE# #INDENT# cleaned_data = super ( AbstractSinglePreferenceForm , self ) . clean ( ) #NEWLINE# try : #NEWLINE# #INDENT# ( self . instance . name , self . instance . section ) = ( cleaned_data [ 'name' ] , cleaned_data [ 'section' ] ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# cleaned_data . instance . preference #NEWLINE# #UNINDENT# except NotFoundInRegistry : #NEWLINE# #INDENT# raise ValidationError ( NotFoundInRegistry . detail_default ) #NEWLINE# #UNINDENT# return self . cleaned_data