Commit e33ef391 authored by Michael Yang's avatar Michael Yang Committed by Jeffrey Morgan
Browse files

fix push scope error for inherited model

parent 75295b95
...@@ -55,7 +55,7 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *Reg ...@@ -55,7 +55,7 @@ func (b *blobUpload) Prepare(ctx context.Context, requestURL *url.URL, opts *Reg
if b.From != "" { if b.From != "" {
values := requestURL.Query() values := requestURL.Query()
values.Add("mount", b.Digest) values.Add("mount", b.Digest)
values.Add("from", b.From) values.Add("from", ParseModelPath(b.From).GetNamespaceRepository())
requestURL.RawQuery = values.Encode() requestURL.RawQuery = values.Encode()
} }
...@@ -260,7 +260,7 @@ func (b *blobUpload) uploadChunk(ctx context.Context, method string, requestURL ...@@ -260,7 +260,7 @@ func (b *blobUpload) uploadChunk(ctx context.Context, method string, requestURL
return err 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 { if method == http.MethodPatch {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment