Adapt to new sql model

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-10-02 00:20:04 +02:00
parent 7d7acbcf14
commit 7a4046ad65
4 changed files with 11 additions and 24 deletions

View File

@@ -95,8 +95,7 @@ func (w *CacheStore) WarmCache(ctx context.Context) error {
func (w *CacheStore) warmDomain(ctx context.Context, conn pg.Conn, domain *coredata.CustomDomain) error {
var loadedDomain coredata.CustomDomain
scope := coredata.NewScope(domain.OrganizationID.TenantID())
if err := loadedDomain.LoadByID(ctx, conn, scope, w.encryptionKey, domain.ID); err != nil {
if err := loadedDomain.LoadByID(ctx, conn, coredata.NewNoScope(), w.encryptionKey, domain.ID); err != nil {
return fmt.Errorf("cannot load domain with decrypted values: %w", err)
}