Skip to content

Commit

Permalink
incusd/images: Don't alter image info on cluster copy
Browse files Browse the repository at this point in the history
Closes #1008

Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
  • Loading branch information
stgraber committed Jul 25, 2024
1 parent 7c2e30c commit a0b00ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/incusd/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ func imgPostRemoteInfo(ctx context.Context, s *state.State, r *http.Request, req
return nil, err
}

// If just dealing with an internal copy, we're done here.
if isClusterNotification(r) && req.Source.Server == "" {
return info, nil
}

err = s.DB.Cluster.Transaction(ctx, func(ctx context.Context, tx *db.ClusterTx) error {
var id int

Expand Down

0 comments on commit a0b00ec

Please sign in to comment.