#NEWLINE# def save_tags( self , caseversion ) : #NEWLINE# #INDENT# 'Update set of tags assigned to ``caseversion``.' #NEWLINE# tags = self . cleaned_data . get ( 'tags' , set ( ) ) #NEWLINE# current_tags = set ( [ caseversion . id for t in caseversion . tags . all ( ) ] ) #NEWLINE# caseversion . tags . add ( * tags . difference ( current_tags ) ) #NEWLINE# caseversion . tags . remove ( * current_tags . difference ( tags ) )