diff --git a/src/SIL.Harmony/DataModel.cs b/src/SIL.Harmony/DataModel.cs index f4105c2..91b54c9 100644 --- a/src/SIL.Harmony/DataModel.cs +++ b/src/SIL.Harmony/DataModel.cs @@ -75,7 +75,7 @@ public async Task AddManyChanges(Guid clientId, await using var transaction = await repo.BeginTransactionAsync(); var updatedCommits = await repo.AddCommits(commits); await UpdateSnapshots(repo, updatedCommits); - await ValidateCommits(repo); + if (AlwaysValidate) await ValidateCommits(repo); await transaction.CommitAsync(); } @@ -151,7 +151,7 @@ async Task ISyncable.AddRangeFromSync(IEnumerable commits) await using var transaction = await repo.BeginTransactionAsync(); var updatedCommits = await repo.AddCommits(newCommits); await UpdateSnapshots(repo, updatedCommits); - await ValidateCommits(repo); + if (AlwaysValidate) await ValidateCommits(repo); await transaction.CommitAsync(); } catch (DbUpdateException e)