Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Prelload flows and templates in GetTenant similar to GetOrCreateTenant
Browse files Browse the repository at this point in the history
  • Loading branch information
laurentluce committed Aug 26, 2024
1 parent f9f033c commit adca982
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kontrol-service/database/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (db *Db) GetTenant(
tenantId string,
) (*Tenant, error) {
var tenant Tenant
result := db.db.Where("tenant_id = ?", tenantId).First(&tenant)
result := db.db.Where("tenant_id = ?", tenantId).Preload("Flows").Preload("Templates").First(&tenant)
if result.Error != nil {
if result.Error == gorm.ErrRecordNotFound {
return nil, nil
Expand Down

0 comments on commit adca982

Please sign in to comment.