#NEWLINE# def update( self , node , validated_data ) : #NEWLINE# #INDENT# 'Update instance with the validated data. Requires\n        the request to be in the serializer context.\n        ' #NEWLINE# assert isinstance ( node , Node ) , 'collection must be a Node' #NEWLINE# auth = get_user_auth ( self . context [ 'request' ] ) #NEWLINE# if validated_data : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# node . update ( validated_data , auth = auth ) #NEWLINE# #UNINDENT# except ValidationValueError as e : #NEWLINE# #INDENT# raise InvalidModelValueError ( detail = e . message ) #NEWLINE# #UNINDENT# except PermissionsError : #NEWLINE# #INDENT# raise exceptions . PermissionDenied #NEWLINE# #UNINDENT# #UNINDENT# return node