Skip to content

Commit e8df37f

Browse files
authored
[Fix] Error when using FlyteFile as default value in workflow (#3322)
Signed-off-by: machichima <[email protected]>
1 parent 9effe91 commit e8df37f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

flytekit/interaction/click_types.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,9 @@ class FileParamType(click.ParamType):
156156
def convert(
157157
self, value: typing.Any, param: typing.Optional[click.Parameter], ctx: typing.Optional[click.Context]
158158
) -> typing.Any:
159-
if isinstance(value, ArtifactQuery):
159+
if isinstance(value, (ArtifactQuery, FlyteFile)):
160160
return value
161+
161162
# set remote_directory to false if running pyflyte run locally. This makes sure that the original
162163
# file is used and not a random one.
163164
remote_path = None if getattr(ctx.obj, "is_remote", False) else False
@@ -177,6 +178,7 @@ class PickleParamType(click.ParamType):
177178

178179
def get_metavar(self, param: Parameter, ctx: Context) -> t.Optional[str]:
179180
return "Python Object <Module>:<Object>"
181+
180182
else:
181183

182184
def get_metavar(self, param: Parameter, *args) -> t.Optional[str]:

0 commit comments

Comments
 (0)