Skip to content

Commit

Permalink
add warning for 0ul sample volumes
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Svard committed Oct 17, 2024
1 parent fdd729e commit 0be198e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cg_lims/EPPs/udf/calculate/aliquot_volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ 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 != 0 and sample_volume < minimum_volume) or (
return (sample_volume < minimum_volume) or (
buffer_volume != 0 and buffer_volume < minimum_volume
)

Expand Down Expand Up @@ -96,9 +96,6 @@ def calculate_volumes(
sample_volume=round(sample_volume, 2),
buffer_volume=round(buffer_volume, 2),
):
print(
f"sample {get_one_sample_from_artifact(artifact=art).id} has sample vol {round(sample_volume, 2)} and buffer vol {round(buffer_volume, 2)}"
)
samples_below_threshold.append(get_one_sample_from_artifact(artifact=art).id)

set_volumes(
Expand Down

0 comments on commit 0be198e

Please sign in to comment.