Closed eduardsmirnov closed 10 months ago
Hi!
I believe the check whether BT-161 exists or has value greater than zero is done in line 515 https://github.com/Hankintailmoitukset/hilma-api/blob/master/validation/ENoticeValidator.cs#L515.
Please let me know if this was not the case you were referring to.
// value is nullable int? // when value is null, would you step in or not? // null > 0 is false if (!(value > 0)) { // }
When TotalAmount's Value is null, the if statement returns true and you step in. Does this answer your question?
@arinurkkala When TotalAmount's Value is null, you step into the statement and return validation error about BT-161. BUT by TED SDK 1.7, BT-161 is forbidden in subtype 36 and TotalAmount's Value is expected to be null.
Yup, you are right @eduardsmirnov. I will create a ticket to get this fixed.
@eduardsmirnov Hello. The fix to bt-161 validation for notices of type eF36 and eF37 should now be available in the test environment.
closed as resolved
We got a validation message for a notice of subtype 36 which was not caught by our internal validator. “Validation error\nBT-161-NoticeResult total amount is required when any lot has a winner."
Looking at the code of your validator https://github.com/Hankintailmoitukset/hilma-api/blob/master/validation/ENoticeValidator.cs it seems like you run validation for all award notices without any check if the field BT-161 exists on a notice or not.
Please fix me if I am wrong.