Skip to content

Commit

Permalink
fix: allow None action in ActionWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
adeprez committed Oct 14, 2024
1 parent 3baf09b commit ddaabc7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lavague-sdk/lavague/sdk/trajectory/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ def from_dict(
def deserialize_action(cls, values: Dict[str, Any]) -> Dict[str, Any]:
if "action" in values:
action_data = values["action"]
if not isinstance(action_data, Action) and "action_type" in action_data:
if (
action_data
and not isinstance(action_data, Action)
and "action_type" in action_data
):
action_class = DEFAULT_PARSER.engine_action_builders.get(
action_data["action_type"], Action
)
Expand Down

0 comments on commit ddaabc7

Please sign in to comment.