Produce a clean list of dataset instances if not datasets in collection

This commit is contained in:
mvdbeek
2020-11-10 15:30:29 +01:00
parent 39c7c3dfd4
commit 92a76e9fd4
+1 -1
View File
@@ -4141,7 +4141,7 @@ class DatasetCollection(Dictifiable, UsesAnnotations, RepresentById):
depth_collection_type = depth_collection_type.split(":", 1)[1]
select_from = select_from.outerjoin(hda, hda.c.id == de.c.hda_id)
select_stmt = select([hda]).select_from(select_from).where(dc.c.id == self.id).distinct()
return db_session.query(HistoryDatasetAssociation).select_entity_from(select_stmt).all()
return db_session.query(HistoryDatasetAssociation).select_entity_from(select_stmt).filter(HistoryDatasetAssociation.id.isnot(None)).all()
else:
# Sessionless context
instances = []