Merge pull request #33261 from aaronlehmann/empty-platform
api: Only return a Platform when relevant information is available
This commit is contained in:
commit
f888a25ff5
1 changed files with 1 additions and 1 deletions
|
@ -122,7 +122,7 @@ func (s *distributionRouter) getDistributionInfo(ctx context.Context, w http.Res
|
|||
var platform v1.Platform
|
||||
if err == nil {
|
||||
err := json.Unmarshal(configJSON, &platform)
|
||||
if err == nil {
|
||||
if err == nil && (platform.OS != "" || platform.Architecture != "") {
|
||||
distributionInspect.Platforms = append(distributionInspect.Platforms, platform)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue