Skip to content

Commit

Permalink
fix(protocol-designer): moveLabware newLocation error accounts for cu… (
Browse files Browse the repository at this point in the history
#14917)

…stom labware

closes RESC-243 and RQA-2573
  • Loading branch information
jerader committed Apr 16, 2024
1 parent df1d203 commit 59d4cc6
Showing 1 changed file with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { LabwareLocation } from '@opentrons/shared-data'
import { getLabwareDefIsStandard } from '@opentrons/shared-data'
import {
COMPATIBLE_LABWARE_ALLOWLIST_BY_MODULE_TYPE,
COMPATIBLE_LABWARE_ALLOWLIST_FOR_ADAPTER,
} from '../../utils/labwareModuleCompatibility'
import type { LabwareLocation } from '@opentrons/shared-data'
import type {
InvariantContext,
LabwareEntity,
Expand All @@ -11,15 +12,18 @@ import type { ProfileFormError } from './profileErrors'

type HydratedFormData = any

// TODO(Jr, 1/16/24): look into the use case of this util since the i18n strings
// previously listed in this util were not found in any json.
const getMoveLabwareError = (
labware: LabwareEntity,
newLocation: LabwareLocation,
invariantContext: InvariantContext
): string | null => {
let errorString: string | null = null
if (labware == null || newLocation == null || newLocation === 'offDeck')
if (
labware == null ||
newLocation == null ||
newLocation === 'offDeck' ||
!getLabwareDefIsStandard(labware?.def)
)
return null
const selectedLabwareDefUri = labware?.labwareDefURI
if ('moduleId' in newLocation) {
Expand Down

0 comments on commit 59d4cc6

Please sign in to comment.