#NEWLINE# @ classmethod #NEWLINE# def merge_ziggy_form_instances( cls , source_data , update_data ) : #NEWLINE# #INDENT# for item in update_data : #NEWLINE# #INDENT# matches = filter ( cls . field_by_name_exists ( item [ 'name' ] ) , source_data ) #NEWLINE# if ( len ( matches ) > 0 ) : #NEWLINE# #INDENT# match = matches [ 0 ] #NEWLINE# match . update ( item ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# source_data . append ( item ) #NEWLINE# #UNINDENT# #UNINDENT# return source_data