Skip to content

Commit 106cc69

Browse files
committed
Fix filter for data/material input
1 parent 4e9a632 commit 106cc69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

experiment/src/org/labkey/experiment/api/ExpProtocolApplicationImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ private long deleteDataInputs()
397397
OntologyManager.deleteOntologyObjects(svc.getSchema(), new SQLFragment("SELECT " +
398398
dialect.concatenate("'" + DataInput.lsidPrefix() + "'",
399399
"CAST(dataId AS VARCHAR)", "'.'", "CAST(targetApplicationId AS VARCHAR)") +
400-
" FROM " + svc.getTinfoDataInput() + " WHERE TargetApplicationId IN (SELECT RowId FROM exp.ProtocolApplication WHERE RunId = " + getRowId() + ")"), getContainer());
400+
" FROM " + svc.getTinfoDataInput() + " WHERE TargetApplicationId = ?", getRowId()), getContainer());
401401

402402
return Table.delete(ExperimentServiceImpl.get().getTinfoDataInput(), new SimpleFilter(FieldKey.fromParts("TargetApplicationId"), getRowId()));
403403
}
@@ -413,7 +413,7 @@ private long deleteMaterialInputs()
413413
OntologyManager.deleteOntologyObjects(svc.getSchema(), new SQLFragment("SELECT " +
414414
dialect.concatenate("'" + MaterialInput.lsidPrefix() + "'",
415415
"CAST(materialId AS VARCHAR)", "'.'", "CAST(targetApplicationId AS VARCHAR)") +
416-
" FROM " + svc.getTinfoMaterialInput() + " WHERE TargetApplicationId IN (SELECT RowId FROM exp.ProtocolApplication WHERE RunId = " + getRowId() + ")"), getContainer());
416+
" FROM " + svc.getTinfoMaterialInput() + " WHERE TargetApplicationId = ?", getRowId()), getContainer());
417417

418418
return Table.delete(ExperimentServiceImpl.get().getTinfoMaterialInput(), new SimpleFilter(FieldKey.fromParts("TargetApplicationId"), getRowId()));
419419
}

0 commit comments

Comments
 (0)