Skip to content

Commit 718ba4a

Browse files
committed
Fix Execution.action_group type and add missing fields
action_group uses _to_optional which can return None, but the type annotation was non-optional. Also add start_time, execution_type and execution_sub_type which are present in the API response but were silently dropped by _flexible_init.
1 parent 2963052 commit 718ba4a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pyoverkiz/models.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,16 @@ class Execution:
653653
description: str
654654
owner: str = field(repr=obfuscate_email)
655655
state: str
656-
action_group: ActionGroup = field(converter=_to_optional("ActionGroup"))
656+
action_group: ActionGroup | None = field(
657+
default=None, converter=_to_optional("ActionGroup")
658+
)
659+
start_time: int | None = None
660+
execution_type: ExecutionType | None = field(
661+
default=None, converter=_to_optional_enum(ExecutionType)
662+
)
663+
execution_sub_type: ExecutionSubType | None = field(
664+
default=None, converter=_to_optional_enum(ExecutionSubType)
665+
)
657666

658667

659668
@_flexible_init

0 commit comments

Comments
 (0)