mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-11-25 21:38:48 +00:00
refactor: Replace unused context parameters with blank identifiers and fix variable references
- Replace ctx parameter with _ in provisionTenantContext, provisionDatabaseSchema, provisionStorageResources, configureCarrier, configureRatePlans, setupPaymentProcessing, and validateCompliance methods - Fix tenant_id scope to use wrappedTx.tenantID instead of r.tenantID in TenantScopedTransaction - Fix pricing effectiveness analytics to use ratePlanAnalytics.AverageDiscount and ratePlanAnalytics.TotalSavings instead of analytics.
This commit is contained in:
@@ -80,7 +80,7 @@ func (r *TenantAwareRepository) TenantScopedTransaction(ctx context.Context, fn
|
||||
// Since the function expects *gorm.DB, we need to embed the wrapper properly
|
||||
return fn(wrappedTx.DB.Scopes(func(db *gorm.DB) *gorm.DB {
|
||||
// Apply tenant filtering to all queries
|
||||
return db.Where("tenant_id = ?", r.tenantID)
|
||||
return db.Where("tenant_id = ?", wrappedTx.tenantID)
|
||||
}))
|
||||
}
|
||||
return fn(tx)
|
||||
|
||||
Reference in New Issue
Block a user