#NEWLINE# def save( self , commit = True ) : #NEWLINE# #INDENT# attributes = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for attr in self . available_attrs : #NEWLINE# #INDENT# value = self . cleaned_data . pop ( attr . get_formfield_name ( ) ) #NEWLINE# attributes [ attr . pk ] = ( value . pk if hasattr ( value , 'pk' ) else value ) #NEWLINE# #UNINDENT# self . instance . attributes = attributes #NEWLINE# return super ( VariantAttributeForm , self ) . save ( commit = commit )