#NEWLINE# def validate( self , value ) : #NEWLINE# #INDENT# val = super ( UUID , self ) . validate ( val ) #NEWLINE# if ( val is None ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# if isinstance ( val , _UUID ) : #NEWLINE# #INDENT# return val #NEWLINE# #UNINDENT# if isinstance ( val , six . string_types ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return _UUID ( val ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# raise ValidationError ( '{0} {1} is not a valid uuid' . format ( self . column_name , value ) )