diff --git a/api/src/opentrons/protocol_engine/state/labware.py b/api/src/opentrons/protocol_engine/state/labware.py index c8792f516b0..a18c1b0c965 100644 --- a/api/src/opentrons/protocol_engine/state/labware.py +++ b/api/src/opentrons/protocol_engine/state/labware.py @@ -741,13 +741,6 @@ def raise_if_labware_cannot_be_stacked( raise errors.LabwareCannotBeStackedError( f"Labware {top_labware_definition.parameters.loadName} cannot be loaded onto labware {below_labware.loadName}" ) - elif isinstance(below_labware.location, ModuleLocation): - below_definition = self.get_definition(labware_id=below_labware.id) - if not labware_validation.validate_definition_is_adapter(below_definition): - raise errors.LabwareCannotBeStackedError( - f"Labware {top_labware_definition.parameters.loadName} cannot be loaded" - f" onto a labware on top of a module" - ) elif isinstance(below_labware.location, OnLabwareLocation): further_below_definition = self.get_definition( labware_id=below_labware.location.labwareId diff --git a/api/tests/opentrons/protocol_engine/state/test_labware_view.py b/api/tests/opentrons/protocol_engine/state/test_labware_view.py index 5e7e96412fa..21983920898 100644 --- a/api/tests/opentrons/protocol_engine/state/test_labware_view.py +++ b/api/tests/opentrons/protocol_engine/state/test_labware_view.py @@ -1334,38 +1334,6 @@ def test_raise_if_labware_cannot_be_stacked_not_validated() -> None: ) -def test_raise_if_labware_cannot_be_stacked_on_module_not_adapter() -> None: - """It should raise if the below labware on a module is not an adapter.""" - subject = get_labware_view( - labware_by_id={ - "labware-id": LoadedLabware( - id="labware-id", - loadName="test", - definitionUri="def-uri", - location=ModuleLocation(moduleId="module-id"), - ) - }, - definitions_by_uri={ - "def-uri": LabwareDefinition.construct( # type: ignore[call-arg] - allowedRoles=[LabwareRole.labware] - ) - }, - ) - - with pytest.raises(errors.LabwareCannotBeStackedError, match="module"): - subject.raise_if_labware_cannot_be_stacked( - top_labware_definition=LabwareDefinition.construct( # type: ignore[call-arg] - parameters=Parameters.construct( # type: ignore[call-arg] - loadName="name" - ), - stackingOffsetWithLabware={ - "test": SharedDataOverlapOffset(x=0, y=0, z=0) - }, - ), - bottom_labware_id="labware-id", - ) - - def test_raise_if_labware_cannot_be_stacked_on_labware_on_adapter() -> None: """It should raise if the OnLabware location is on an adapter.""" subject = get_labware_view(