Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Break connection in workflow editor if necessary #4431

Merged
merged 1 commit into from Aug 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions client/galaxy/scripts/mvc/workflow/workflow-node.js
Expand Up @@ -223,6 +223,11 @@ define(['mvc/workflow/workflow-view-node'], function( NodeView ) {
$.each( data.data_outputs, function( i, output ) {
if (!nodeView.outputViews[output.name]) {
nodeView.addDataOutput(output); // add data output if it does not yet exist
} else {
// the output already exists, but the output formats may have changed.
// Therefore we update the datatypes and destroy invalid connections.
node.output_terminals[ output.name ].datatypes = output.extensions;
node.output_terminals[ output.name ].destroyInvalidConnections();
}
});
this.tool_state = data.tool_state;
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/workflow/workflow-terminals.js
Expand Up @@ -134,7 +134,7 @@ define(['mvc/workflow/workflow-globals'], function( Globals ) {
},
destroyInvalidConnections: function( ) {
_.each( this.connectors, function( connector ) {
connector.destroyIfInvalid();
connector && connector.destroyIfInvalid();
} );
},
setMapOver : function( val ) {
Expand Down
2 changes: 1 addition & 1 deletion static/maps/mvc/workflow/workflow-node.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.