Skip to content

Commit 20fcebf

Browse files
authored
Merge pull request galaxyproject#22291 from mvdbeek/fix_hdca_multiple_true_selection
[26.0] Fix HDCA shown as unavailable on tool form rerun
2 parents 3ca472c + 4c7988f commit 20fcebf

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

lib/galaxy/tools/parameters/basic.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2452,15 +2452,25 @@ def append_ldda(ldda):
24522452
# Route each to the correct options list by type so the client can
24532453
# match them by id *and* src.
24542454
for value in job_input_values:
2455-
if isinstance(value, (HistoryDatasetCollectionAssociation, HistoryDatasetAssociation)):
2455+
if isinstance(value, HistoryDatasetCollectionAssociation):
2456+
# HDCAs are handled by the dataset collections section below;
2457+
# only add here if not visible in the current history.
2458+
if value.deleted or not value.visible or value.history != history:
2459+
if value.deleted:
2460+
state = "deleted"
2461+
elif not value.visible:
2462+
state = "hidden"
2463+
else:
2464+
state = "not in current history"
2465+
append(d["options"]["hdca"], value, f"({state}) {value.name}", "hdca", True)
2466+
elif isinstance(value, HistoryDatasetAssociation):
24562467
if value.deleted:
24572468
state = "deleted"
24582469
elif not value.visible:
24592470
state = "hidden"
24602471
else:
24612472
state = "not in current history"
2462-
src = "hdca" if isinstance(value, HistoryDatasetCollectionAssociation) else "hda"
2463-
append(d["options"][src], value, f"({state}) {value.name}", src, True)
2473+
append(d["options"]["hda"], value, f"({state}) {value.name}", "hda", True)
24642474
elif isinstance(value, DatasetCollectionElement):
24652475
append_dce(value)
24662476
elif isinstance(value, LibraryDatasetDatasetAssociation):

0 commit comments

Comments
 (0)