Skip to content

Commit

Permalink
Patch aliquot volumes EPP for 0 ul volumes (#551)(patch)
Browse files Browse the repository at this point in the history
### Fixed
- No longer count 0 ul volumes as being too low in the volume aliquot EPP
  • Loading branch information
Karl-Svard authored Oct 17, 2024
1 parent e0208f5 commit e40767d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cg_lims/EPPs/udf/calculate/aliquot_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ def volumes_below_threshold(
minimum_volume: float, sample_volume: float, buffer_volume: float
) -> bool:
"""Check if volume aliquots are below the given threshold."""
return sample_volume < minimum_volume or buffer_volume < minimum_volume
return (sample_volume < minimum_volume) or (
buffer_volume != 0 and buffer_volume < minimum_volume
)


def calculate_volumes(
Expand Down Expand Up @@ -90,7 +92,9 @@ def calculate_volumes(
max_volume=max_volume, sample_volume=sample_volume
)
if volumes_below_threshold(
minimum_volume=minimum_limit, sample_volume=sample_volume, buffer_volume=buffer_volume
minimum_volume=minimum_limit,
sample_volume=round(sample_volume, 2),
buffer_volume=round(buffer_volume, 2),
):
samples_below_threshold.append(get_one_sample_from_artifact(artifact=art).id)

Expand Down

0 comments on commit e40767d

Please sign in to comment.