Preload services targets

This commit is contained in:
Viktor Liu
2026-02-12 16:04:55 +08:00
parent 381260911b
commit bd47f44c63

View File

@@ -1100,7 +1100,7 @@ func (s *SqlStore) getAccountGorm(ctx context.Context, accountID string) (*types
Preload("NetworkRouters"). Preload("NetworkRouters").
Preload("NetworkResources"). Preload("NetworkResources").
Preload("Onboarding"). Preload("Onboarding").
Preload("Services"). Preload("Services.Targets").
Take(&account, idQueryCondition, accountID) Take(&account, idQueryCondition, accountID)
if result.Error != nil { if result.Error != nil {
log.WithContext(ctx).Errorf("error when getting account %s from the store: %s", accountID, result.Error) log.WithContext(ctx).Errorf("error when getting account %s from the store: %s", accountID, result.Error)