diff --git a/cg/services/order_validation_service/response_mapper.py b/cg/services/order_validation_service/response_mapper.py index 64d273f02d..031f59a7e5 100644 --- a/cg/services/order_validation_service/response_mapper.py +++ b/cg/services/order_validation_service/response_mapper.py @@ -48,6 +48,9 @@ def map_sample_errors(order: dict, errors: list[SampleError]) -> None: def add_error(entity: dict, field: str, message: str) -> None: if not entity.get(field): set_field(entity=entity, field=field, value=None) + if field == "sample_errors": + # Special handling for sample errors since the 'value' corresponds to whether it is set + entity[field]["value"] = True entity[field]["errors"].append(message)