add artifact.Identifiable by Identity() method

Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Alex Goodman
2021-11-08 16:46:14 -05:00
parent b08a11e46d
commit 69d2b1ba3c
6 changed files with 28 additions and 10 deletions
+2 -2
View File
@@ -93,8 +93,8 @@ func toRelationshipModel(relationships []artifact.Relationship) []model.Relation
result := make([]model.Relationship, len(relationships))
for i, r := range relationships {
result[i] = model.Relationship{
Parent: string(r.From),
Child: string(r.To),
Parent: string(r.From.Identity()),
Child: string(r.To.Identity()),
Type: string(r.Type),
Metadata: r.Data,
}