#NEWLINE# def update_model( self , form , model ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# form . populate_obj ( model ) #NEWLINE# self . _on_model_change ( form , model , False ) #NEWLINE# model . save ( ) #NEWLINE# save_inline ( form , model ) #NEWLINE# #UNINDENT# except Exception as ex : #NEWLINE# #INDENT# if ( not self . handle_view_exception ( ex ) ) : #NEWLINE# #INDENT# flash ( gettext ( 'Failed to update record. %(error)s' , error = str ( ex ) ) , 'error' ) #NEWLINE# log . exception ( 'Failed to update record.' ) #NEWLINE# #UNINDENT# return False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . after_model_change ( form , model , False ) #NEWLINE# #UNINDENT# return True