Skip to content

Commit

Permalink
Fix after refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
islean committed Jan 16, 2025
1 parent cd127d4 commit 4276d68
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cg/services/order_validation_service/response_mapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 4276d68

Please sign in to comment.