From 8e1d41cc0dcbc074c400d91ba372487d32688097 Mon Sep 17 00:00:00 2001 From: Daniel Schick Date: Wed, 6 Nov 2024 10:22:31 +0100 Subject: [PATCH] create errors instead of violations for too large waste amounts --- bsmd.database/Waste.cs | 8 ++++---- bsmd.database/WasteReceived.cs | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bsmd.database/Waste.cs b/bsmd.database/Waste.cs index 191a7fd6..feffc008 100644 --- a/bsmd.database/Waste.cs +++ b/bsmd.database/Waste.cs @@ -255,16 +255,16 @@ namespace bsmd.database violations.Add(RuleEngine.CreateViolation(ValidationCode.V784, "WasteCode", null, this.Title, this.Identifier, this.Tablename)); if (this.WasteDisposalAmount_MTQ >= 10000) - violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename)); + errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename)); if (this.WasteCapacity_MTQ >= 10000) - violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename)); + errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste capacity too high", null, this.Title, this.Identifier, this.Tablename)); if (this.WasteAmountRetained_MTQ >= 10000) - violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename)); + errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste amount retained too high", null, this.Title, this.Identifier, this.Tablename)); if (this.WasteAmountGeneratedTillNextPort_MTQ >= 10000) - violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename)); + errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste generated till next port too high", null, this.Title, this.Identifier, this.Tablename)); if(this.WasteDisposalAmount_MTQ > this.WasteCapacity_MTQ) violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Disposal greater than capacity!", null, this.Title, this.Identifier, this.Tablename)); diff --git a/bsmd.database/WasteReceived.cs b/bsmd.database/WasteReceived.cs index ca19eec9..e7d6dd40 100644 --- a/bsmd.database/WasteReceived.cs +++ b/bsmd.database/WasteReceived.cs @@ -137,7 +137,7 @@ namespace bsmd.database public override void Validate(List errors, List violations) { if (this.AmountWasteReceived_MTQ >= 10000) - violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename)); + errors.Add(RuleEngine.CreateError(ValidationCode.IMPLAUSIBLE, "Waste disposal amount too high", null, this.Title, this.Identifier, this.Tablename)); } #endregion