Skip to content

Commit 6775552

Browse files
committed
Update AuditableEntityInterceptor.cs
1 parent 70a3bb7 commit 6775552

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Infrastructure/Persistence/Interceptors/AuditableEntityInterceptor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ private static void SetCreationAuditInfo(IAuditableEntity entity, string userId,
102102
{
103103
entity.CreatedBy = userId;
104104
entity.Created = now;
105-
if (entity is IMustHaveTenant mustTenant) mustTenant.TenantId = tenantId;
106-
if (entity is IMayHaveTenant mayTenant) mayTenant.TenantId = tenantId;
105+
if (entity is IMustHaveTenant mustTenant && mustTenant.TenantId==null) mustTenant.TenantId = tenantId;
106+
if (entity is IMayHaveTenant mayTenant && mayTenant.TenantId==null) mayTenant.TenantId = tenantId;
107107
}
108108

109109
private static void SetModificationAuditInfo(IAuditableEntity entity, string userId, DateTime now)

0 commit comments

Comments
 (0)