Skip to content

Commit baa248d

Browse files
author
Ralf Grubenmann
committed
address comments
1 parent 656072b commit baa248d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

renku/command/schema/workflow_file.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
# limitations under the License.
1616
"""Represent workflow file run templates."""
1717

18+
from itertools import chain
19+
from typing import List, Union
20+
1821
import marshmallow
1922

2023
from renku.command.schema.calamus import fields, prov, renku, schema
@@ -34,12 +37,15 @@ class Meta:
3437
unknown = marshmallow.EXCLUDE
3538

3639
@marshmallow.pre_dump(pass_many=True)
37-
def fix_ids(self, objs, many, **kwargs):
40+
def fix_ids(self, objs: Union[WorkflowFilePlan, List[WorkflowFilePlan]], many, **kwargs):
3841
"""Renku up to 2.4.1 had a bug that created wrong ids for workflow file entities, this fixes those on export."""
3942

4043
def _replace_id(obj):
4144
obj.unfreeze()
4245
obj.id = obj.id.replace("//plans/", "/")
46+
47+
for child in chain(obj.inputs, obj.outputs, obj.parameters):
48+
child.id = child.id.replace("//plans/", "/")
4349
obj.freeze()
4450

4551
if many:

0 commit comments

Comments
 (0)