Corrected boolean logic on bypass filter logic #131

Merged
khwezi merged 1 commits from finishline into main 2026-10-04 10:58:11 +02:00
@@ -67,7 +67,7 @@ public sealed class ApplicationDbContext(DbContextOptions<ApplicationDbContext>
private void ApplyGlobalTenantFilter<TEntity>(ModelBuilder modelBuilder)
where TEntity : class, ITenantEntity =>
modelBuilder.Entity<TEntity>().HasQueryFilter(e => BypassFilter == false && e.TenantId == CurrentTenantId);
modelBuilder.Entity<TEntity>().HasQueryFilter(e => BypassFilter || e.TenantId == CurrentTenantId);
protected override void OnModelCreating(ModelBuilder modelBuilder)
{