Skip to content

Commit

Permalink
Solved issue BU-ISCIII#320 ERROR multiple returned when searching for…
Browse files Browse the repository at this point in the history
… a sample
  • Loading branch information
luissian committed Sep 28, 2024
1 parent 2c98ce2 commit 95dbf45
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions core/utils/samples.py
Original file line number Diff line number Diff line change
Expand Up @@ -925,10 +925,14 @@ def get_all_sample_information(sample_id, join_values=False):
molecule_id=molecule
).exists():
try:
# use the last value to avoid errors for incorrect
# used.
mol_param_value.append(
core.models.MoleculeParameterValue.objects.get(
core.models.MoleculeParameterValue.objects.filter(
molecule_id=molecule, molecule_parameter_id=p_name
).get_param_value()
)
.last()
.get_param_value()
)
except core.models.MoleculeParameterValue.DoesNotExist:
# if the parameter was not set at the time the molecule was handeled
Expand Down

0 comments on commit 95dbf45

Please sign in to comment.