From e33ef391cd937f1e46e7f257e7722e3014c79981 Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 16 Nov 2023 11:44:09 -0800 Subject: [PATCH] fix push scope error for inherited model --- server/upload.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/upload.go b/server/upload.go index 04575560d..8b4836180 100644 --- a/server/upload.go +++ b/server/upload.go @@ -55,7 +55,7 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *Reg if b.From != "" { values := requestURL.Query() values.Add("mount", b.Digest) - values.Add("from", b.From) + values.Add("from", ParseModelPath(b.From).GetNamespaceRepository()) requestURL.RawQuery = values.Encode() } @@ -260,7 +260,7 @@ func (b *blobUpload) uploadChunk(ctx context.Context, method string, requestURL return err } - return fmt.Errorf("http status %d %s: %s", resp.StatusCode, resp.Status, body) + return fmt.Errorf("http status %s: %s", resp.Status, body) } if method == http.MethodPatch {