Skip to content

Commit

Permalink
Patch tube well position behaviour (#3955) (patch)
Browse files Browse the repository at this point in the history
### Fixed

- Samples in tubes get their well position set to None
  • Loading branch information
islean authored Nov 19, 2024
1 parent cf65b58 commit 317aba9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cg/models/lims/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ class LimsSample(BaseModel):
index_sequence: str | None
udfs: Udf | None

@validator("well_position", pre=False)
def reset_well_positions_for_tubes(cls, value: str, values: dict[str, str]):
return None if values["container"] == "Tube" else value

@classmethod
def parse_obj(cls, obj: dict):
parsed_obj: LimsSample = super().parse_obj(obj)
Expand Down

0 comments on commit 317aba9

Please sign in to comment.