diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py index 88e924b7a2a0b3002d9c06aba4c70d02967982c0..1719e5eca793c6c7213a7278f69a5a606d0d7c71 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/file-system-plugins/eln-tree/resolver-plugins/flow.py @@ -6,7 +6,7 @@ import script def addSampleChildNodes(path, samplePermId, sampleType, response, acceptor, context): - dataSets = getDataSetsOfSampleAndItsDescendants(samplePermId, context) + dataSets = getDataSetsOfSampleAndItsDescendants(samplePermId, False, context) filteredDataSets = [] for dataSet in dataSets: if acceptor.acceptDataSet(dataSet): @@ -14,7 +14,7 @@ def addSampleChildNodes(path, samplePermId, sampleType, response, acceptor, cont script.addDataSetFileNodesFor(path, filteredDataSets, response, acceptor, context) def addSampleChildNodesWithPlates(path, samplePermId, sampleType, response, acceptor, context): - dataSets = getDataSetsOfSampleAndItsDescendants(samplePermId, context) + dataSets = getDataSetsOfSampleAndItsDescendants(samplePermId, True, context) filteredDataSets = [] for dataSet in dataSets: sampleTypeCode = dataSet.getSample().getType().getCode() @@ -23,16 +23,16 @@ def addSampleChildNodesWithPlates(path, samplePermId, sampleType, response, acce script.addDataSetFileNodesFor(path, filteredDataSets, response, acceptor, context) script.addSampleSampleChildNodes(path, samplePermId, response, acceptor, context) -def getDataSetsOfSampleAndItsDescendants(samplePermId, context): +def getDataSetsOfSampleAndItsDescendants(samplePermId, supressWells, context): samplePermIds = [] - gatherAllDescendants(samplePermIds, samplePermId, context) + gatherAllDescendants(samplePermIds, samplePermId, supressWells, context) dataSetSearchCriteria = DataSetSearchCriteria() dataSetSearchCriteria.withOrOperator() for id in samplePermIds: dataSetSearchCriteria.withSample().withPermId().thatEquals(id) return script.getDataSets(dataSetSearchCriteria, context) -def gatherAllDescendants(samplePermIds, samplePermId, context): +def gatherAllDescendants(samplePermIds, samplePermId, supressWells, context): samplePermIds.append(samplePermId) id = SamplePermId(samplePermId) fetchOptions = SampleFetchOptions() @@ -40,8 +40,8 @@ def gatherAllDescendants(samplePermIds, samplePermId, context): children = context.getApi().getSamples(context.getSessionToken(), [id], fetchOptions)[id].getChildren() for child in children: sampleTypeCode = child.getType().getCode() - if not sampleTypeCode.endswith("_WELL"): - gatherAllDescendants(samplePermIds, child.getPermId().getPermId(), context) + if not supressWells or not sampleTypeCode.endswith("_WELL"): + gatherAllDescendants(samplePermIds, child.getPermId().getPermId(), supressWells, context) for t in ["FACS_ARIA", "INFLUX", "MOFLO_XDP", "S3E", "SONY_SH800S", "SONY_MA900"]: acceptor.hideSampleType("%s_SPECIMEN" % t)