Skip to content

Commit

Permalink
Message update and _plan_distribute simplified
Browse files Browse the repository at this point in the history
Updated error message to be consistent with desired message, moved error raise to a validation function call to ensure _plan_distribute is not too complex
  • Loading branch information
CaseyBatten committed Sep 26, 2023
1 parent 7ecfeeb commit e298cbc
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions api/src/opentrons/protocols/advanced_control/transfers.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,12 @@ def _extend_source_target_lists(
]
return sources, targets

def _check_valid_disposal_volume(self):
if self._strategy.disposal_volume >= self._instr.max_volume:
raise ValueError(
"The disposal volume must be less than the maximum volume of the pipette"
)

def _plan_distribute(self):
"""
* **Source/ Dest:** One source to many destinations
Expand Down Expand Up @@ -572,10 +578,7 @@ def _plan_distribute(self):
"""

if self._strategy.disposal_volume >= self._instr.max_volume:
raise ValueError(
"The Disposal Volume must be less than the Maximum Volume of the Instrument"
)
self._check_valid_disposal_volume()

# TODO: decide whether default disposal vol for distribute should be
# pipette min_vol or should we leave it to being 0 by default and
Expand Down

0 comments on commit e298cbc

Please sign in to comment.