#NEWLINE# def update_or_create( self , **kwargs ) : #NEWLINE# #INDENT# ( obj , created ) = self . get_or_create ( ** kwargs ) #NEWLINE# if ( not created ) : #NEWLINE# #INDENT# fields = dict ( kwargs . pop ( 'defaults' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) ) #NEWLINE# fields . update ( kwargs ) #NEWLINE# update_model_with_dict ( obj , fields ) #NEWLINE# #UNINDENT# return obj