Skip to content

Commit

Permalink
changed the log level of some messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Svard committed Nov 18, 2024
1 parent f0a901a commit eaad5c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions cg_lims/EPPs/udf/calculate/library_normalization.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ def calculate_sample_volume(
) -> float:
"""Calculate and return the sample volume needed to reach the desired final concentration."""
if final_concentration > sample_concentration:
error_message: str = (
warning_message: str = (
f"The final concentration ({final_concentration} nM) is higher than the original one"
f" ({sample_concentration} nM) for sample {artifact.samples[0].id}. No dilution needed."
)
LOG.error(error_message)
LOG.warning(warning_message)
global failed_samples
failed_samples.append(artifact.name)
return total_volume
Expand Down
6 changes: 3 additions & 3 deletions cg_lims/EPPs/udf/calculate/library_normalization_revio.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ def calculate_total_volume(
) -> float:
"""Calculate and return the total volume needed to reach the desired final concentration."""
if final_concentration > sample_concentration:
error_message: str = (
warning_message: str = (
f"The final concentration ({final_concentration} ng/ul) is higher than the original one"
f" ({sample_concentration} ng/ul) for sample {artifact.samples[0].id}. No dilution needed."
)
LOG.error(error_message)
LOG.warning(warning_message)
global failed_samples
failed_samples.append(artifact.name)
return sample_volume
Expand Down Expand Up @@ -110,7 +110,7 @@ def library_normalization_revio(
if failed_samples:
failed_samples_string = ", ".join(failed_samples)
error_message = f"The following artifacts had a lower concentration than targeted: {failed_samples_string}"
LOG.info(error_message)
LOG.error(error_message)
raise InvalidValueError(error_message)
message: str = "Volumes were successfully calculated."
LOG.info(message)
Expand Down

0 comments on commit eaad5c6

Please sign in to comment.