Skip to content

Commit

Permalink
save latest id to dict
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectronicBlueberry committed Nov 25, 2024
1 parent 127893f commit 8d26e19
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Workflow/List/WorkflowCardList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function onPreview(id: string) {
// TODO: clean-up types, as soon as better Workflow type is available
function onInsert(workflow: Workflow) {
emit("insertWorkflow", workflow.latest_id as any, workflow.name as any);
emit("insertWorkflow", workflow.latest_workflow_id as any, workflow.name as any);
}
function onInsertSteps(workflow: Workflow) {
Expand Down
2 changes: 2 additions & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7766,6 +7766,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpd

dict_collection_visible_keys = [
"id",
"latest_workflow_id",
"name",
"create_time",
"update_time",
Expand All @@ -7776,6 +7777,7 @@ class StoredWorkflow(Base, HasTags, Dictifiable, RepresentById, UsesCreateAndUpd
]
dict_element_visible_keys = [
"id",
"latest_workflow_id",
"name",
"create_time",
"update_time",
Expand Down
4 changes: 3 additions & 1 deletion lib/galaxy/webapps/galaxy/services/workflows.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def index(
query, total_matches = self._workflows_manager.index_query(trans, payload, include_total_count)
rval = []
for wf in query.all():
item = wf.to_dict(value_mapper={"id": trans.security.encode_id})
item = wf.to_dict(
value_mapper={"id": trans.security.encode_id, "latest_workflow_id": trans.security.encode_id}
)
encoded_id = trans.security.encode_id(wf.id)
item["annotations"] = [x.annotation for x in wf.annotations]
item["url"] = web.url_for("workflow", id=encoded_id)
Expand Down

0 comments on commit 8d26e19

Please sign in to comment.