Skip to content

Commit

Permalink
commands schema and logic in validate action
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri committed Oct 1, 2024
1 parent 65d1f1e commit 10ee57a
Show file tree
Hide file tree
Showing 2 changed files with 886 additions and 245 deletions.
7 changes: 6 additions & 1 deletion api/src/opentrons/protocol_engine/state/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,12 @@ def validate_action_allowed( # noqa: C901
elif action.request.intent == CommandIntent.FIXIT:
if (
self._state.queue_status != QueueStatus.AWAITING_RECOVERY
or not self._state.is_door_blocking
or self.get_status()
in (
EngineStatus.BLOCKED_BY_OPEN_DOOR,
EngineStatus.AWAITING_RECOVERY_BLOCKED_BY_OPEN_DOOR,
)
and action.request.commandType != "unsafe/ungripLabware"
):
raise FixitCommandNotAllowedError(
"Fixit commands are not allowed when the run is not in a recoverable state."
Expand Down
Loading

0 comments on commit 10ee57a

Please sign in to comment.