Skip to content

Commit

Permalink
fix(api, engine): raise exception in analysis if deactivate shaker is…
Browse files Browse the repository at this point in the history
… called while heater-shaker's latch is open (#12735)

raise if deactivate shaker is called while latch is open
  • Loading branch information
jbleon95 authored May 18, 2023
1 parent abea829 commit a14cdd6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ async def execute(self, params: DeactivateShakerParams) -> DeactivateShakerResul
module_id=params.moduleId
)

hs_module_substate.raise_if_labware_latch_not_closed()

# Allow propagation of ModuleNotAttachedError.
hs_hardware_module = self._equipment.get_module_hardware_api(
hs_module_substate.module_id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ def raise_if_labware_latch_not_closed(self) -> None:
"""Raise an error if labware is not latched on the heater-shaker."""
if self.labware_latch_status == HeaterShakerLatchStatus.UNKNOWN:
raise CannotPerformModuleAction(
"Heater-Shaker cannot start shaking if the labware latch status has not been set to closed."
"Heater-Shaker cannot start or deactivate shaking if the labware latch has not been set to closed."
)
elif self.labware_latch_status == HeaterShakerLatchStatus.OPEN:
raise CannotPerformModuleAction(
"Heater-Shaker cannot start shaking while the labware latch is open."
"Heater-Shaker cannot start or deactivate shaking while the labware latch is open."
)

def raise_if_shaking(self) -> None:
Expand Down

0 comments on commit a14cdd6

Please sign in to comment.