#NEWLINE# def update( self , instance , validated_data ) : #NEWLINE# #INDENT# view = self . context [ 'view' ] #NEWLINE# user_or_group = view . get_user_or_group ( ) #NEWLINE# auth_obj = instance [ user_or_group ] #NEWLINE# validated_data [ user_or_group ] = auth_obj #NEWLINE# obj = validated_data [ 'object' ] #NEWLINE# app_label = obj . _meta . app_label #NEWLINE# model_name = obj . _meta . model_name #NEWLINE# if ( not self . partial ) : #NEWLINE# #INDENT# for perm in instance [ 'permissions' ] : #NEWLINE# #INDENT# remove_perm ( ( '%s.%s_%s' % ( app_label , perm , model_name ) ) , auth_obj , view ) #NEWLINE# #UNINDENT# #UNINDENT# return self . create ( validated_data )