Skip to content

Commit

Permalink
Return to outerjoin on dce
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed Mar 22, 2024
1 parent 896d7fe commit 234e6bd
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6273,7 +6273,7 @@ def attribute_columns(column_collection, attributes, nesting_level=None):
inner_dce = alias(DatasetCollectionElement)
inner_dc = alias(DatasetCollection)
order_by_columns.append(inner_dce.c.element_index)
q = q.join(inner_dce, inner_dce.c.dataset_collection_id == dce.c.child_collection_id)
q = q.outerjoin(inner_dce, inner_dce.c.dataset_collection_id == dce.c.child_collection_id)
if collection_attributes:
q = q.join(inner_dc, inner_dc.c.id == dce.c.child_collection_id)
q = q.add_columns(*attribute_columns(inner_dce.c, element_attributes, nesting_level))
Expand All @@ -6294,11 +6294,7 @@ def attribute_columns(column_collection, attributes, nesting_level=None):
or return_entities
and not return_entities == (DatasetCollectionElement,)
):
q = q.join(HistoryDatasetAssociation)
if HistoryDatasetAssociation not in return_entities:
# if we do return HDAs we'll be joining on the dataset implicitly,
# so join here only if we're not already joining on dataset
q = q.join(Dataset)
q = q.join(HistoryDatasetAssociation).join(Dataset)
if dataset_permission_attributes:
q = q.join(DatasetPermissions)
q = (
Expand Down

0 comments on commit 234e6bd

Please sign in to comment.