Fixed HAZ validation logic when there are positions and checkbox is set

This commit is contained in:
Daniel Schick 2024-11-04 15:42:42 +01:00
parent ed666aff0c
commit 06509767e5

View File

@ -510,7 +510,7 @@ namespace bsmd.database
public override void Validate(List<MessageError> errors, List<MessageViolation> violations)
{
if (!this.NoDPGOnBoardOnArrival ?? true)
if (!(this.NoDPGOnBoardOnArrival ?? true) && !this.HasPositions)
{
violations.Add(RuleEngine.CreateViolation(ValidationCode.IMPLAUSIBLE, "No DPG on board set", null, this.Title, null, this.Tablename));
}