From d585e4892f09544d4215e24791323f426da520d4 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Tue, 19 Jul 2022 10:18:00 +0200 Subject: [PATCH] for expired documents create violations instead of errors --- ENI2/ENI2.csproj | 4 ++-- bsmd.database/RuleEngine.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ENI2/ENI2.csproj b/ENI2/ENI2.csproj index 07dfd66a..bef72be2 100644 --- a/ENI2/ENI2.csproj +++ b/ENI2/ENI2.csproj @@ -36,8 +36,8 @@ 5.4.0.0 true publish.html - 1 - 7.4.0.1 + 2 + 7.4.0.2 false true true diff --git a/bsmd.database/RuleEngine.cs b/bsmd.database/RuleEngine.cs index d22adbf5..40b2c78f 100644 --- a/bsmd.database/RuleEngine.cs +++ b/bsmd.database/RuleEngine.cs @@ -356,11 +356,11 @@ namespace bsmd.database break; case ValidationCode.PAST_DATE: { - if (value.Length == 0) errors.Add(RuleEngine.CreateError(ValidationCode.NOT_NULL, property.Name, value, entity.Title, identifier, entity.Tablename)); + if (value.Length == 0) violations.Add(RuleEngine.CreateViolation(ValidationCode.NOT_NULL, property.Name, value, entity.Title, identifier, entity.Tablename)); if (DateTime.TryParse(value, out DateTime aTime)) { if (aTime < DateTime.UtcNow) - errors.Add(RuleEngine.CreateError(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename)); + violations.Add(RuleEngine.CreateViolation(validationCode, property.Name, value, entity.Title, identifier, entity.Tablename)); } } break;