Skip to content

Commit

Permalink
fix the landing accessory data (goharbor#19661)
Browse files Browse the repository at this point in the history
Fix the keywords when to list accessories belong to the subject manifest.

Signed-off-by: wang yan <wangyan@vmware.com>
Signed-off-by: Altynbaev Dinislam <altynbayevdr@sberautotech.ru>
  • Loading branch information
wy65701436 authored and Altynbaev Dinislam committed Jan 29, 2024
1 parent 73c70e7 commit 88e9295
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/middleware/subject/subject.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ func Middleware() func(http.Handler) http.Handler {
// In certain cases, the OCI client may push the subject artifact and accessory in either order.
// Therefore, it is necessary to handle situations where the client pushes the accessory ahead of the subject artifact.
digest := digest.FromBytes(body)
accs, err := accessory.Mgr.List(ctx, q.New(q.KeyWords{"SubjectArtifactDigest": digest, "SubArtifactRepo": info.Repository}))
accs, err := accessory.Mgr.List(ctx, q.New(q.KeyWords{"SubjectArtifactDigest": digest, "SubjectArtifactRepo": info.Repository}))
if err != nil {
logger.Errorf("failed to list accessory artifact: %s, error: %v", digest, err)
return err
Expand Down

0 comments on commit 88e9295

Please sign in to comment.