Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol-designer): switching pipettes when source and/or dest labware fields are unselected #16894

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -543,29 +543,30 @@ const updatePatchOnPipetteChannelChange = (
const sourceLabwareId: string = appliedPatch.aspirate_labware as string
const destLabwareId: string = appliedPatch.dispense_labware as string
const sourceLabware = labwareEntities[sourceLabwareId]
const sourceLabwareDef = sourceLabware.def
const destLabware = labwareEntities[destLabwareId]

update = {
aspirate_wells: getAllWellsFromPrimaryWells(
appliedPatch.aspirate_wells as string[],
sourceLabwareDef,
channels as 8 | 96
),
dispense_wells:
destLabwareId.includes('trashBin') ||
destLabwareId.includes('wasteChute')
? getDefaultWells({
labwareId: destLabwareId,
pipetteId,
labwareEntities,
pipetteEntities,
})
: getAllWellsFromPrimaryWells(
appliedPatch.dispense_wells as string[],
destLabware.def,
channels as 8 | 96
),
if (sourceLabwareId != null && destLabwareId != null) {
update = {
aspirate_wells: getAllWellsFromPrimaryWells(
appliedPatch.aspirate_wells as string[],
sourceLabware.def,
channels as 8 | 96
),
dispense_wells:
destLabwareId.includes('trashBin') ||
destLabwareId.includes('wasteChute')
? getDefaultWells({
labwareId: destLabwareId,
pipetteId,
labwareEntities,
pipetteEntities,
})
: getAllWellsFromPrimaryWells(
appliedPatch.dispense_wells as string[],
destLabware.def,
channels as 8 | 96
),
}
}
}

Expand Down
Loading