@@ -385,22 +385,23 @@ def _update_package_relationship(relationship, comment, context):
385385 ref_package_by = ref_package_by )
386386 return rel_dict
387387
388+
388389def package_relationship_update (context , data_dict ):
389390 '''Update a relationship between two datasets (packages).
390391
392+ The subject, object and type parameters are required to identify the
393+ relationship. Only the comment can be updated.
394+
391395 You must be authorized to edit both the subject and the object datasets.
392396
393- :param id: the id of the package relationship to update
394- :type id: string
395397 :param subject: the name or id of the dataset that is the subject of the
396- relationship (optional)
398+ relationship
397399 :type subject: string
398400 :param object: the name or id of the dataset that is the object of the
399- relationship (optional)
401+ relationship
400402 :param type: the type of the relationship, one of ``'depends_on'``,
401403 ``'dependency_of'``, ``'derives_from'``, ``'has_derivation'``,
402404 ``'links_to'``, ``'linked_from'``, ``'child_of'`` or ``'parent_of'``
403- (optional)
404405 :type type: string
405406 :param comment: a comment about the relationship (optional)
406407 :type comment: string
@@ -410,7 +411,8 @@ def package_relationship_update(context, data_dict):
410411
411412 '''
412413 model = context ['model' ]
413- schema = context .get ('schema' ) or schema_ .default_update_relationship_schema ()
414+ schema = context .get ('schema' ) \
415+ or schema_ .default_update_relationship_schema ()
414416
415417 id , id2 , rel = _get_or_bust (data_dict , ['subject' , 'object' , 'type' ])
416418
0 commit comments