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
|
|
@ -33,8 +33,11 @@ func (s *sqlDatabase) ListAllScaleSets(_ context.Context) ([]params.ScaleSet, er
|
|||
|
||||
q := s.conn.Model(&ScaleSet{}).
|
||||
Preload("Organization").
|
||||
Preload("Organization.Endpoint").
|
||||
Preload("Repository").
|
||||
Preload("Repository.Endpoint").
|
||||
Preload("Enterprise").
|
||||
Preload("Enterprise.Endpoint").
|
||||
Omit("extra_specs").
|
||||
Omit("status_messages").
|
||||
Find(&scaleSets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue