Browse Source

Merge pull request #15587 from abpframework/auto-merge/rel-7-0/1698

Merge branch dev with rel-7.0
pull/15589/head
maliming 3 years ago
committed by GitHub
parent
commit
87faf8ee39
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs
  2. 1
      modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs

1
modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/EntityChange.cs

@ -46,6 +46,7 @@ public class EntityChange : Entity<Guid>, IMultiTenant, IHasExtraProperties
TenantId = tenantId;
ChangeTime = entityChangeInfo.ChangeTime;
ChangeType = entityChangeInfo.ChangeType;
EntityTenantId = entityChangeInfo.EntityTenantId;
EntityId = entityChangeInfo.EntityId.Truncate(EntityChangeConsts.MaxEntityTypeFullNameLength);
EntityTypeFullName = entityChangeInfo.EntityTypeFullName.TruncateFromBeginning(EntityChangeConsts.MaxEntityTypeFullNameLength);

1
modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo/Abp/AuditLogging/MultiTenantAuditLog_Tests.cs

@ -71,5 +71,6 @@ public class MultiTenantAuditLog_Tests : AuditLogsTestBase
auditLog.EntityChanges.Count.ShouldBe(2);
auditLog.EntityChanges.ShouldContain(e => e.EntityId == entityId1.ToString());
auditLog.EntityChanges.ShouldContain(e => e.EntityId == entityId2.ToString());
auditLog.EntityChanges.ShouldContain(e => e.EntityTenantId == tenantId);
}
}

Loading…
Cancel
Save