Skip to content

Commit

Permalink
lxd/storage_pools: Remove duplicate usedBy entries when retrieving st…
Browse files Browse the repository at this point in the history
…orage pools

Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Oct 11, 2023
1 parent 09a198e commit 6838125
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lxd/storage_pools.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,9 @@ func storagePoolGet(d *Daemon, r *http.Request) response.Response {
return response.SmartError(err)
}

// Remove duplicate users.
poolUsedBy = shared.RemoveDuplicatesFromSlice(poolUsedBy)

poolAPI := pool.ToAPI()
poolAPI.UsedBy = project.FilterUsedBy(s.Authorizer, r, poolUsedBy)

Expand Down

0 comments on commit 6838125

Please sign in to comment.