<#4736 [BUG] Optional dataclass inputs crash Flyte...
# flyte-github
c
#4736 [BUG] Optional dataclass inputs crash Flyte Console Issue created by bstadlbauer ### Describe the bug Given a custom
dataclass
(struct) inputs such as: @dataclass_json @dataclass class MyInput: a: int If a workflow now specifies this as an optional input, e.g.
def my_workflow(a: Optional[MyInput])
one cannot input that through Flyte Console. Flyte Console crashed leading to a white screen. ### Expected behavior Inputs in FlyteConsole work also for optional struct types. ### Additional context to reproduce from dataclasses import dataclass from typing import NamedTuple, Optional from dataclasses_json import dataclass_json from flytekit import task, workflow @dataclass_json @dataclass class MyInput: a: int @task def my_task(): return @workflow def my_workflow(a: Optional[MyInput]): my_task() if name == "__main__": my_workflow(a=MyInput(a=5)) ### Screenshots Screen.Recording.2024-01-17.at.15.49.06.mov ### Are you sure this issue hasn't been raised already? • Yes ### Have you read the Code of Conduct? • Yes flyteorg/flyte