#NEWLINE# def update_error_dict( self , error_dict ) : #NEWLINE# #INDENT# if hasattr ( self , 'message_dict' ) : #NEWLINE# #INDENT# if error_dict : #NEWLINE# #INDENT# for ( k , v ) in self . message_dict . items ( ) : #NEWLINE# #INDENT# error_dict . setdefault ( k , [ ] ) . extend ( v ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# error_dict = self . message_dict #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# error_dict [ NON_FIELD_ERRORS ] = self . messages #NEWLINE# #UNINDENT# return error_dict