Skip to content

Non-existent link ID returned when create_data_link is a noop #478

@MrCreosote

Description

@MrCreosote

When using the update: True parameter with create_data_link, if the link from the UPA/data_id to the sample/version already exists, the server takes no action. However, the code [1] creates a new UUID for the link ID and returns that instead of the existing link. The DB code needs to be updated to return the prior link in this case (currently it returns the expired link ID, if any. The behavior should probably be to return the existing link (in the case of a noop) or the expired link (in the case of an expiration) along with a boolean describing which is which.

[1] https://github.com/kbase/sample_service/blob/master/lib/SampleService/core/samples.py#L391-L397

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions