Preload missing resources
There are some inconsistencies in the way the API returns some values for pools and scale sets. This is due to not preloading the appropriate relations. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This commit is contained in:
parent
9f2764f614
commit
b2dee1d844
5 changed files with 29 additions and 4 deletions
|
|
@ -46,6 +46,7 @@ func (s *sqlDatabase) ListAllPools(_ context.Context) ([]params.Pool, error) {
|
|||
Preload("Enterprise").
|
||||
Preload("Enterprise.Endpoint").
|
||||
Omit("extra_specs").
|
||||
Omit("status_messages").
|
||||
Find(&pools)
|
||||
if q.Error != nil {
|
||||
return nil, errors.Wrap(q.Error, "fetching all pools")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue